• Why did I abandon Ubuntu?


    This paper is from the original text https://www.howtogeek.com/430… In case of infringement, please let me delete it. Ubuntu is one of the Linux distributions of choice for many developers, but after ten years of using it, the author of this article finally “abandoned” it and moved to “others.”. Why? The translation is as follows: I’ve […]

  • Shell script for monitoring Kafka lag value


    I handwritten a shell script to monitor the Kafka lag value. It was written in Python before, which is more troublesome. Here is a shell version, which you can use directly. cd /usr/share/kafka/kafka_2.11-2.4.1/ || exit 1 lag=$(./bin/kafka-consumer-groups.sh –bootstrap-server localhost:9092 –describe –group my_group 2>/dev/null|grep -v GROUP|awk ‘NR>1{num+=$6}END{print num}’) echo “$lag” if [ “$lag” -gt 10 ];then […]

  • Align HTML images and text up and down


    //HTML <div class=”l4″> <img alt /> <span>{{item.see}}</span> </div> //CSS .l4 { position: absolute; left: 0; bottom: 0; span { vertical-align: middle; } img { vertical-align: middle; } } Original effect: Set vertical align: middle; at the same time for the picture and span tag to solve the problem, and set a total feeling separately After […]

  • ##Initial experience of segmentfault blog


    Initial experience of segmentfault blog Copy and paste the local markdown. Preview feels good, comparable to GitHub. However, the only drawback is that the code view is not very good, and other feelings have not been tried. So after experiencing it in the future, continue to comment, and then write an article here in the […]

  • Sublime text 2 close remember last open file


    I feel that sublime’s function of remembering to open files last time is very annoying. Turn it off In “user”/ Preferences.sublime -Settings “add an entry in the configuration file: “hot_exit”: false, “remember_open_files”: false It’s much cleaner to open it again.

  • Promise and Reduce


    Promise organization code Promise Ajax version promise, to solve the problem of asynchronous. ajax1().then(ajax2).then(ajax3).then(()=>{}) Comments: it always makes people feel that promise exists for Ajax Some people cleverly encapsulate promise on the pop-up components. //Callback mode Alert (‘are you sure you want to delete this data ‘, () = >{ console.log (‘deleted successfully’) },()=>{ console.log […]

  • Electron: use react as the renderer


    preface From the previous understanding of electron, we can see some characteristics of electron. Among them,Main ProcessUsed to schedule eachRenderer Process; andRenderer ProcessIn fact, it is web + (better than web function, let me call it that once). In addition to the features of web application itself, they can also be extended by introducing electron. […]

  • Align HTML picture and text up and down


    //HTML <div class=”l4″> <img alt /> <span>{{item.see}}</span> </div> //CSS .l4 { position: absolute; left: 0; bottom: 0; span { vertical-align: middle; } img { vertical-align: middle; } } Original effect: It can be solved by setting vertical align: middle; on both the picture and span label. Setting a single image always feels uneven After setting:

  • Exclusive interview of byte beat front end: slag two is not a scientific class, how to grow savagely after one and a half years of experience


    Preface: This official account is concerned about Daniel’s history, front-end interview, Electron, Taro, React-native, Node.js source code, instant messaging and other large front end technology stack. Welcome to pay attention, feel good writing, you can see something. Thanks. The interviewee is a little brother with one and a half years of experience, a byte beating […]

  • Solve the problem that a short white screen appears when electron starts


    When an application built with electronic is first opened, a short white screen appears. This process should be to load local resources So how to optimize this problem? By looking up the official documents, we can hide it when creating the window now, and then display it after loading When the page is loaded, the […]

  • The first day of blog opening


    On December 4, 2019, I opened my blog today. I have been learning for 3 years. I feel that I have a foundation but I haven’t gone deep enough. I have learned some things and forgotten them. I hereby open my blog to make a record, record every knowledge point in my later study, and […]

  • What redis client tool are you using?


    Today, I found a good redis client tool:AnotherRedisDesktopManager。 Compatible with windows, MAC and Linux, it is so-called fast and stable that it will not crash when a large number of keys are loaded. The star on GitHub already has3.2kNow. After a trial installation, I feel it’s not bad. It’s easy to install. It can be […]