Posts

Life is a marathon

life is a journey. It can be short or it can be long. It's not a short race if you choose to live. How far you go is totally depends on how long you want to go and how persistent you are. So put your sadness and weakness back, let's go and see how far we can reach.

How to set a out network whitelist firewall in linux?

 A whitelist firewall only allows user to visit a list of domain or ip. ufw is a fake one, it can not block out traffic.   https://github.com/yingshaoxo/yingshaoxo_v2ray_linux32?tab=readme-ov-file#android-client

How to install a linux system by copy disk partition

 If you can copy the whole disk, then do it, it works better. 1. copy your old alpine system partition as a iso file, especially make sure the `/boot` folder has files: `vmlinuxz-grsec` and `initramfs-grsec`. `dd if=/dev/sdb2 of=xx.iso` 2. use dd to copy that disk partiton to your new computer partition, a ext4 would be fine. `dd if=xx.iso of=/dev/sdb2` 3. i am using `lubuntu16_i386` system to work as a PE system, all you have to do is install lubuntu16_i386 to another partition of your disk. It will generate a not working version of grub boot menu for you, you can see "unknown linux distrubution" when you boot your computer. you need to fix it later. 4. boot into lubuntu16, `sudo su`, `vim /etc/grub.d/40_custom`, add following to the bottom: ``` menuentry 'Alpine' { insmod part_msdos insmod ext2 set root='hd0,msdos5' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root -

How to backup data and sync data in a safe way? -- made by yingshaoxo

  Suppose you have 3 disk, 1MB disk, 10GB disk, 1TB disk. In 1MB disk, you only save folder tree, there has no files in each folder. In 10GB disk, it has all folder from 1MB disk, and for some folder, it got some files in those folder, but only pure text file. Each file is less than 10MB. In 1TB disk, it has all folders and files from 10GB disk, but it got more files, more types of file, some file even bigger than 100MB. For all 3 disks, they all have a txt file at top, that txt file contains all folder and files tree information of 1TB disk. To sync those disks, all you have to do is use `rsync` to copy all files and folder from 1MB to 10GB, then do the same thing from 10GB to 1TB. But for file deletion, you only do the deletion at your level disk, you do not have permission to delete file in smaller size disk.

How to turn gitbook markdown files into html files with one js file

1. Under your markdown folder, create index.html with the help with docsify.js ``` <!-- index.html --> <!DOCTYPE html> <html>   <head>     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />     <meta name="viewport" content="width=device-width,initial-scale=1" />     <meta charset="UTF-8" />     <link       rel="stylesheet"       href="//cdn.jsdelivr.net/npm/docsify@4/themes/vue.css"     />   </head>   <body>     <div id="app"></div>     <script>       window.$docsify = {         loadSidebar: 'SUMMARY.md'       };     </script>     <script src="//cdn.jsdelivr.net/npm/docsify@4"></script>   </body> </html> ``` 2. Serve html with python python -m http.server 3000 3. Visit http://0.0.0.0:3000/

How to set up a socket5 proxy service with ssh?

How to set up a socket5 proxy server by using ssh: ssh -D 14141 -Cq root@5.63.7.0 # You can use your socket5 proxy in this way:  #curl -x socks5h://127.0.0.1:14141 google.com

a_typical_chinese_novel (chapter1 to 8)

这是一本科幻历史小说。除了符合逻辑、事实与推理,它将不受任何束缚地被讲述。 它可以针砭时政治,可以解析事件、描述道理。 通过阅读本书,你会发现,历史总是惊人的相似。人们所遇到的困难,大多数都是被前人解决过的问题。只不过解决方案 被历代统治集团 审查、删改,使其被从公共知识库删除掉了。 就算该知识没被审查机构删除,只要 该知识的作者 没钱交 服务器费用、出版费、广告费、保护费,该知识同样会被从搜索引擎或者出版物上删除。   第一章 大规模监控与愚民政策 渐渐地,你会发现,不管你做什么事情,都要提前汇报,被批准了才能去做。 举个例子,做生意需要营业执照。架设一个网站,需要备案。就连把jupyter_notebook用域名暴露到公网,都需要提前申请ssl。如此一来,你的自由就很有限了。不管做什么,别人都提前知道。 另外,谈谈愚民政策。愚民,简单点讲,就是统治者觉得除了他们那一派外,其他人都应该尽可能的愚蠢。 举个例子,对于一个很简单的问题,如果你只依赖公共网络的知识去解决它,比如大众搜索引擎,最终的结果是,你会使用最低效的方法。本来3步能解决的问题,网上的教程可能写了20步。最可恶的是,当你独自花了大力气解决了某个问题,隔几个月,你就发现你的解决方案失效了。需要不断地做重复劳动解决之前被解决过的问题。耗费你的生命。 现在,闭上眼睛,想象一个场景:假设你在一片荒原,四周一望无际,一个人都没有,是不是很自由?然后,你来到一片草地,前方从稀到密,出现了一条布满食物与美好事物的大道。你沿着道路慢慢前行,却丝毫没有意识到四周的囚笼逐渐缩小。为什么会这样?主要的原因是你步入了别人的圈套。   第二章 谁智力低,谁就要被掠夺 为什么人们不反抗?最主要的原因是人们的智力太低。要不就是人们没有意识到自己被掠夺,要不就是人们没有反抗的能力。 同时,统治或者控制你的集团并不傻。他们对人们的压制策略,是循序渐进开展的。通过 逐步地 限制人们的自由、剥夺人们的权利、降低人们的能力、减少人们的资源,人们会越来越弱,并逐步地接受一切对他们自身不利的事物,并将这种压榨视为理所当然。 如此一来,就不会出现激进的反抗。就会出现"被圈养的羊"效应: 因为羊从小被链子套着,所以长大后就算把链子解掉,羊也不会跑,并且觉得被链子套住是理所当然的。 只有 反控制的能

How to sync data betwen 3 disk storage?

How to sync data in 3 disk storage? 1. You have diskA, diskB, and diskC. diskC should have biggest storage. 2. You compare diskA, diskB and diskC, find common things in 3 disk. find different parts in 3 disk. 3. You manually choose what folder or file in diskA need to get saved. A software will remember that. 4. You manually choose what folder or file in diskB need to get saved. This time it would be easier for you because software remembers some choice you did last time. 5. You copy everything need to get saved from diskA and diskB to diskC. 6. You delete unwanted difference data in diskC. 7. You re-manage diskC data. 8. You copy diskC data into diskA and diskB directly by overwrite everything.