Posts

Showing posts from 2017

Install Chinese input method on Kali System

0. Set ibus sudo apt install ibus sudo im-config 1. Install RIME sudo apt-get install ibus-rime https://github.com/rime/home/wiki/RimeWithIBus#ubuntu 2. Select Input Language reboot System Setting — Region&Language — input Source, then click ‘+’ button, choose Chinese 3. Ready to use Press Super + space to switch your input method. Press F4 to switch schema(simple or complex). ​

Fail to install Kali system on disk?

Kali installation, It's all about choice. -1. format your disk using PE system, we need a clear disk, or something will going wrong 0. use `refus`  to make USB driver 1. just to be safe, use MBR based mix mode 2. use `dd` mode to defend Wi-Fi firmware missing (iso file belongs to Windows, and Windows is bad on drivers) 3. if you can disable secure boot, you can use UEFI in installation, else just use BIOS 4. if you failed, try more option in -1 and 3 step. 5. links may help https://null-byte.wonderhowto.com/forum/fix-failed-detect-and-mount-cd-rom-problem-when-installing-kali-linux-0177158/ https://forums.kali.org/showthread.php?35926-Executing-grub-install-dummy-failed https://wiki.deepin.org/index.php?title=Repair_Boot https://www.linux.com/learn/how-rescue-non-booting-grub-2-Linux

Use DNS tunnel to get free internet

0. setup https://qiuri.org/806.html https://www.rawidn.com/posts/how-to-use-dns-tunnel.html when you ready, do this test (put sub.your_domain.com in): http://code.kryo.se/iodine/check-it/ 1. in server:  iodined -f -p 5353 -P password your_local_server_ip(192.168.100.1) sub.your_domain.com iptables -t nat -A PREROUTING -i eth0 -p udp --dport 53 -j DNAT --to :5353 2. in local:  sudo iodine -f -P password your_server_ip sub.your_domain.com 3. around set ssr, enjoy it.

How to set syncthing on server correctly

Why you need this? It's simple, you don't wanna upload or download by yourself. 0. download and uncompress package `wget https://github.com/syncthing/syncthing/releases/download/v0.14.44-rc.3/syncthing-linux-amd64-v0.14.44-rc.3.tar.gz` `tar xf syncthing-linux-amd64-v0.14.44-rc.3.tar.gz` 'mv syncthing-linux-amd64-v0.14.44-rc.3 syncthing' 1. you can't run syncthing in root mode. add a user by `adduser user` 2. setting auto start when boot `cp syncthing/syncthing /usr/bin/` `cp syncthing/etc/linux-systemd/system/syncthing@.service /etc/systemd/system/syncthing@user.service` ` systemctl enable syncthing@user.service ` 3. run to get config file ` systemctl start syncthing@user.service ` 4. change localhost to 0.0.0.0 `vim /home/user/.config/syncthing/config.xml` replace `127.0.0.1` with `0.0.0.0` 5. reboot and see `reboot` see `http://your_server_ip:8384`

Change User-Agent through HTTP-Proxy

#### Install Privoxy `sudo apt install privoxy` #### Change config `sudo vim /etc/privoxy/config` 1. Search `listen-address` and replace it with: `listen-address 0.0.0.0:8118` 2. Search `enable-remote-toggle` , `enable-edit-actions` and make sure they're enabled. 3. At the end of the file, add the following rules: ``` # passby all https connection: forward :443 . # passby the login page: forward 192.168.138.180 . ``` #### Change config through webpage 1. Open `http://p.p` in your browser 2. Choose `View & change the current configuration` 3. Find `match-all.action` and click `Edit` 4. Enable `hide-referrer` and `hide-from-header` 5. Find `User Agent string to send`, write down ` Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/59.0.3071.109 Chrome/59.0.3071.109 Safari/537.36` 6. Click `Submit` at the  the page 7. Remove or Delete all other rules you can see on those webpages. 8. In the end, it looks like this: ```

How to set Chinese Input Method on Lubuntu

1. Install RIME ` sudo apt-get install ibus-rime` `sudo apt-get install librime-data-pinyin-simp  ` https://github.com/rime/home/wiki/RimeWithIBus#ubuntu 2. Select Input Engine Preference -> Language Support -> Install Chinese Language and Select IBus as Keyboard input method system 3. Ready to use  `reboot` Press Super + space to switch input method. Press F4 to switch schema(simple or complex). Left to do: `sudo apt autoremove fcitx*`

Thoughts came from A New University Baby.

1. No Official Solution In real world, there is no absolutely solution for one specific problem, you have to find out the solution right for you, which makes you getting the most benefit. 2. How you learning Sometimes we feel upset is just because of things may not happen as we thought before. That's OK. Due to that, you'll learned how to improve yourself with better prediction and consideration. This kind of training makes man intelligent, it's also the inner theory of Deep Learning.

Giving a proxy to docker using polipo in ubuntu

0. Make sure you have shadowsocks running in the background https://yingshaoxo.blogspot.com/2017/07/bypass-great-firewall-by-using.html 1. First, set a http_proxy `sudo apt install polipo` `sudo vim /etc/polipo/config` add following and save it: ``` proxyAddress = "0.0.0.0" proxyPort = 1088 socksParentProxy = "localhost:1080" socksProxyType = socks5 ``` `sudo service polipo restart` Now you got a http_proxy at localhost:1088. 2. Give that proxy to docker `sudo vim /etc/default/docker` add or change to `export http_proxy="localhost:1088/"` `sudo service docker restart`

Hot Day

Hello, when you saw this post, I'm in a hot day. That's something weird living in this situation. The day is hot, and my heart also hot, I want to do something great. But helplessly nothing I did. 心里的火焰很强烈,但不知从何下手。 或许我该停下来看书,或许我该静下来学习网课。 I don't know.

Bypass great firewall by using shadowsocks

1. Install shadowsocks first(server) apt-get update apt-get upgrade apt install python3-pip pip3 install setuptools --upgrade pip3 install shadowsocks --upgrade vi ss.json { "server": "45.63.80.154", "port_password": {"8000": "passwd1", "6666": "passwd2"}, "timeout": 300, "method": "aes-256-cfb" } ssserver -c ss.json -d start ssserver -d stop ssserver -c ss.json -d restart You can use bbr to speed up: wget https://down.vpsmm.com/shell/bbr.sh && bash bbr.sh 1. Install shadowsocks first(local) apt-get update apt install python3-pip pip3 install shadowsocks --upgrade locate sslocal crontab -e @reboot /usr/local/bin/sslocal -s 45.63.80.154 -p 8000 -k passwd1 -d start sudo reboot 2. Install proxychains for terminal sudo apt install proxychains vim /etc/proxychains.conf [ProxyList] socks5 127.0.0.1 1080 proxychains curl google.com

Why you failed learning C++?

C++ 最蛋疼的就是 somebody 用很多大写缩写 完全是装逼( 现在的电脑哪还在乎那几个字符所占的空间😒) 记一串乱七八糟的字符不如记一段有意义的英文句子 关键在于如果不能在名称上表明其作用 你就得到处翻文档 那是很痛苦的, and also ineffective.

Using zRAM on Deepin system

1. Save this as  debian-install-zram.sh : #! /bin/bash # not_root () { echo " ERROR: You have to be root to execute this script " exit 1 } zram_exists () { echo " ERROR: /etc/init.d/zram already exists " exit 1 } # Check if user is root [ $EUID != 0 ] && not_root # Check if zram file already exists [ -f /etc/init.d/zram ] && zram_exists cat > /etc/init.d/zram << EOL #!/bin/sh ### BEGIN INIT INFO # Provides: zram # Required-Start: $local_fs # Required-Stop: $local_fs # Default-Start: S # Default-Stop: 0 1 6 # Short-Description: Use compressed RAM as in-memory swap # Description: Use compressed RAM as in-memory swap ### END INIT INFO # Author: Antonio Galea <antonio.galea@gmail.com> # Thanks to Przemysław Tomczyk for suggesting swapoff parallelization FRACTION=75 MEMORY=\`perl -ne'/^MemTotal:\s+(\d+)/ && print \$1*1024;' < /proc/meminf