Skip to content

Instantly share code, notes, and snippets.

@HoriLiu
HoriLiu / FTDI_BAUD_RATE_ALIASING
Created November 10, 2016 08:35
Aliasing Baudrate to 2M Baud by 4800 Baud
Refer section 1.3 of AN232B-05BaudRates.pdf
Divisor = n + sub-interger divisor
Divisor = 1 will give 2MBaud
==> Divisor = 01 + 00
Refer section 2.2 of AN232B-05BaudRates.pdf
71,02 => divisor = 625, rate = 4800
Refer section 6.1 of AN107_AdvancedDriverOptions_AN_000073.pdf
=> Open register.exe in windows directory
@HoriLiu
HoriLiu / NodeMCU-esptool
Created November 11, 2016 13:47
SerriaOS terminal command in MacbookPro
0. Check How to flash firmware
1) https://learn.adafruit.com/building-and-running-micropython-on-the-esp8266/flash-firmware
2) https://github.com/nodemcu/nodemcu-devkit-v1.0
3) https://nodemcu.readthedocs.io/en/dev/en/flash/
1. ls /dev/tty* and find out used serial port
2. python esptool.py --port /dev/tty.SLAB_USBtoUART erase_flash
esptool.py v1.3-dev
Connecting...
@HoriLiu
HoriLiu / Plink_python
Created November 14, 2016 03:32
plink 的簡易教學: 自動連到遠端機器下批次指令(ssh 版)
@HoriLiu
HoriLiu / ubuntu-server-gnome
Last active November 19, 2016 04:42
lightweight desktop manager based on Gnome
sudo apt-get install xorg gnome-core gnome-tweak-tool
Two ways. Either you install Language Support:
sudo apt-get install language-selector-gnome
and do it from there. Optionally you can just run these commands in a terminal window:
sudo mkdir /usr/share/locale-langpack/ru
sudo apt-get install $(check-language-support)
@HoriLiu
HoriLiu / Mac switch screen 1 second
Created December 2, 2016 03:30
一秒切換 Mac 鏡像或延伸畫面(投影機或雙螢幕適用)
1. 常常用筆電做簡報的人一定要把這組熱鍵記起來:「Command + F1」,它可以快速切換雙螢幕的「鏡像模式」或「延伸桌面模式」
2. 除此之外,按「Option + F1」也可以快速進入「系統偏好設定 > 顯示器」,方便你調整雙螢幕相對位置、設定主畫面等
@HoriLiu
HoriLiu / HiDPI setting in PIXEL OS
Last active January 8, 2017 05:02
Raspbian PIXEL Resolution in MPBR 2015
Reference: https://www.raspberrypi.org/forums/viewtopic.php?p=1086671#p1086671
1) Run Raspian with Pixel x86 with Persistence
1. Fire up VMWare Fusion
2. Create a new VM
3. Select "Install from disc or image" as the installation method
4. Select "2016-12-13-pixel-x86-jessie.iso"
5. Select "Debian 8.x" as the operating system
6. Customize the settings as desired. I changed the vm name and set the memory to 1024 MB. I left the vdisk size as 20 GB
7. Start up the newly created vm. Note that PIXEL is actually running from the virtual CD and not the virtual hard disk
http://code.visualstudio.com/docs/setup/setup-overview#_proxy-server-support
User Setting by settings.json
// 將您的設定放入此檔案中以覆寫預設值
{
"http.proxyStrictSSL": false,
"http.proxy": "http://proxy.xxxxx.com:8080",
"window.zoomLevel": 0 //your CNTLM
}
@HoriLiu
HoriLiu / Antergos base install
Last active February 21, 2017 09:55
What do you get? and what is the difference betw this an Arch base install?
https://www.reddit.com/r/LinuxActionShow/comments/414xj5/protip_installing_pure_arch_from_inside_antergos/
https://github.com/Antergos/Cnchi/blob/master/data/packages.xml#L6
https://github.com/Antergos/Cnchi/blob/master/data/packages.xml#L84
You can install real, plain, simple Arch the old-fashioned way from inside Antergos Live media.
There are a couple reasons you might want to do this:
* You have a Chromium, so the docs are right there the whole time. copypasta your way to glory!
(obligatory warning: don't copy commands from you web browser into your terminal unless you know the risks involved)
GParted ('nuff said)
@HoriLiu
HoriLiu / bopomofo.schema.yaml
Created March 4, 2017 07:57 — forked from chenhunghan/bopomofo.schema.yaml
注音輸入法模式 for Squirrel 0.9.20.4 on Mac OSX 10.8.2 please put bopomofo.schema.yaml, default.custom.yaml and squirrel.custom.yaml in ~/Library/Rime then 重新部屬
# Rime schema
# encoding: utf-8
schema:
schema_id: bopomofo
name: 正體
version: "1.3"
author: 這樣 是
- 佛振 <chen.sst@gmail.com>
- turtleknight(修正臺灣使用者輸入習慣) <stk.chen@gmail.com>