Posts

Showing posts from March, 2019

Golang tutorial for pythoner

https://yingshaoxo.gitbooks.io/go-tutorial-for-pythoner/content/

Let's rock the Raspberry Pi

#### 1. set wifi ``` sudo vi etc/wpa_supplicant/wpa_supplicant.conf ``` ``` ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={     ssid="wifi_name"     psk="password" } ``` #### 2. set ssh create a file in `boot` in SD card ``` cd /boot touch ssh ``` #### 3. allow root login ``` sudo vi etc/ssh/sshd_config ``` Change `PermitRootLogin prohibit-password` to `PermitRootLogin yes` #### 4. login ``` ssh pi@ip_address ``` default password is `raspberry` #### 5. change root password ``` sudo su passwd root ``` #### 6. reboot then using ssh ``` ssh root@ip_address ``` you can also using `ssh-copy-id root@ip_address` to use your key #### 7. mount external disk (only for EXT4 format) check info about disks: `sudo fdisk -l` check uuid about disks: `sudo blkid` ``` mkdir /media/usb vi /etc/fstab ``` ``` UUID=fee4308e-1c45-4229-a526-41f43b85928b /media/usb ext4 defaults,auto,

Linux Screen Text Translator

1. Install `GoldenDict` ``` sudo apt-get install goldendict ``` 2. Install `translate-shell` https://github.com/soimort/translate-shell#option-1-direct-download 3. add `Google Source` as `Program` * open `GoldenDict`, chose `Edit`, then click `Dictionaries`, `Programs`, `Add` * add following ``` trans -e google -s en -t zh -show-original y -show-original-phonetics n -show-translation y -no-ansi -show-translation-phonetics n -show-prompt-message n -show-languages n -show-original-dictionary n -show-dictionary n -show-alternatives n "%GDWORD%" ``` 4. Enable `Scan Popup` Click `Edit`, `Preferences`,  `Scan Popup` > you may want to show popup only when you press `shift` key 5. Enjoy it! Force quit and restart ___ https://gist.github.com/yingshaoxo/3a3fa44bcbe59e764d828817b0f3d2fa