index.html

index.html

If "Happily Ever After" did exist

Javascript Loop Array Parsed from JSON
Suppose we need to loop the objects in users array in the following json. 12345678910{ "users": [ { "userID": "foo" }, { "userID": "bar" } ]} 12345678910111213let data = JSON.parse(jsonString);console.log(data...
Compile Nginx with IPDB Module
The IPIP.net provides a free GeoIP database that works well in CN. The database uses ipdb format and can be integrated in Nginx use either the HTTP module or the stream module. The module requires compilation. Here’s the step: Download and extract the Nginx source code from Nginx download page. ...
Hide Applications in KDE Menu
The Application Dashboard is easy to navigate through the installed apps because it put the apps in the categories automatically. However, there are some apps we do not want them to appear. They maybe the dependencies of other applications and we rarely open them. In the following screenshot, yo...
Javascript Run Asynchronous Simultaneously
Life is a lot easier with Async/Await, you can write clean code to handle async operations, for example: 12345678async (arg) => { try { let result = await doFirstJob(arg); return await doSecondJob(result); } catch (e) { throw new Error('Oops!'); ...
Recover bricked EdgeRouter X
A firmware update failure bricked my ER-X completely, it reboots immediately after startup. Luckily there is an official manual on firmware recovery here. Here are the steps to recover a bricked router. Utilities USB to TTL adapter TTY client TFTP server Patience TFTP ServerDownload recovery ...
Tips of Python Multiprocessing in Windows
Damn! The pool won’t join!As a beginner, I started learning how to multiprocessing with pool by copying the snippets from a tutorial to Pycharm. 1234567891011121314151617181920import multiprocessingdef task(num): print("{} started".format(num)) msg = "Success" return num, msgp...
Manage Hard Drives in Zpool Using Vdev ID
It is easy to set up a disk raid using ZFS. Many tutorials / documents give the examples using # zpool create tank /dev/sdb /dev/sdc /dev/sdd. However, this is not a good practice, descibed in the ZFS on Linux FAQ, the names of the devices are not persistent. Any device change, for example, unpl...
Local Service Tunneling with FRP and Caddy
GoalSetup a WebDAV file server and a local webpage with Caddy, then expose the services to the Internet using FRP. LocalhostCaddy123456789101112131415161718192021# /etc/caddy/confighttp://:80/webdav/ { log stdout basicauth / Apocalypse 4W9yaFeC8szfsJGF basicauth / Zaychik aKQG96Bjm...
QQ空间说说批量删除脚本
QQ空间官方没有提供消除账户内容的选项,删除黑历史只能靠脚本解决。从网上找了两个能用的。 桌面端网页版123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118...