Skip to content

Instantly share code, notes, and snippets.

HSIEH, Li-Yi (SHIE, Li-Yi) lyshie

Block or report user

Report or block lyshie

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lyshie
lyshie / API.md
Last active Jul 16, 2019
台灣公路 CCTV 列表
View API.md
@lyshie
lyshie / README.md
Last active Jul 2, 2019
Batch convert docx/doc to pdf with powershell (課程計畫上傳PDF使用)
View README.md

如何使用 docx2pdf 工具將 docx/doc 檔案批次轉換為 pdf

  • 下載 docx2pdf
  • 解壓縮後,將 docx2pdf.cmddocx2pdf.ps1 檔案放置於最上層目錄
  • 執行 docx2pdf.cmd
@lyshie
lyshie / 4way_player.sh
Last active Jul 25, 2019
四錄行車記錄器播放工具
View 4way_player.sh
#!/bin/sh
######## 影片路徑 (L左 R右 F前 B後)
VID_L="/run/media/lyshie/SE1/DCIM/VID_L"
VID_R="/run/media/lyshie/SE1/DCIM/VID_R"
VID_F="/run/media/lyshie/SE/DCIM/VID_F"
VID_B="/run/media/lyshie/SE/DCIM/VID_B"
######## 檔案名稱
######## /run/media/lyshie/SE/DCIM/VID_F/VID_20190616_204734.(ts|kml) => 2019-06-16 20:47:34
@lyshie
lyshie / upgrade_tn_iaas.md
Last active Jun 17, 2019
如何升級臺南市 IaaS 虛擬主機的 Ubuntu (How to upgrade Ubuntu from 12 to the latest version?)
View upgrade_tn_iaas.md

原理

因臺南市 IaaS 虛擬主機沒有提供 console 畫面進行管理,所以必須透過 SSH 遠端登入來操作。網路連線實為必要,如在 VM 上可透過 PXE 優先開機,便可使用以下方法進行移機。透過 PXE Server 的啟用與停用,等同於切換網路開機或本機開機。最後使用 chroot 方式轉移系統。

一、設定 PXE Server

透過 PXE Server 派送 IP 與作業系統給 IaaS 上的 Ubuntu 主機,提供網路開機與簡易的 GNU/Linux 作業系統環境。

二、切換開機模式

  • 設定 VM 開機順序第一個是 PXE,下一個是本機硬碟,停用網路開機就可回到本機硬碟開機。
  • 將 PXE Server 置於同網段內,提供網路開機,派送 SystemRescueCd
  • 開機順序
@lyshie
lyshie / Howto_Block_Content_Farm.md
Last active Apr 29, 2019
如何封鎖內容農場及搜尋結果
View Howto_Block_Content_Farm.md

如何封鎖內容農場及搜尋結果?

為您的瀏覽器安裝「擴充功能」或「附加元件」

請安裝「封鎖內容農場」或「終結內容農場」,當您不小心連結到內容農場時,將會出現警告頁面避免繼續閱讀。

進一步在 Google 搜尋結果中排除內容農場,建議安裝「uBlacklist」,並將「內容農場」網站清單匯入,之後就再也不會出現在搜尋結果了。

建議封鎖清單

@lyshie
lyshie / scratch_3_text.css
Last active Apr 19, 2019
放大 Scratch 3 字型 (Enlarge font size in Scratch 3)
View scratch_3_text.css
/*
1. Install Stylus (https://chrome.google.com/webstore/detail/stylus/clngdbkpkpeebahjckkjfobafhncgmne)
2. URL: Regular expression (https://scratch.mit.edu/projects/.*editor.*)
*/
/*
* {
font-family: "微軟正黑體" !important;
}
*/
@lyshie
lyshie / config-deb-i386.json
Last active Oct 5, 2019
Scratch Desktop (Scratch 3.0 Offline Editor) on GNU/Linux
View config-deb-i386.json
{
"src": "/tmp/scratch-desktop/",
"dest": "/tmp/",
"arch": "i386",
"icon": "/tmp/scratch-desktop/resources/Icon.png",
"categories": [
"Education"
]
}
@lyshie
lyshie / BackupAndroid.md
Last active Aug 7, 2018
Backup Android device via SSHelper and rsync
View BackupAndroid.md
  • Install SSHelper
  • mount Android device via sshfs
    $ printf "admin\n" | sshfs root@192.168.0.101:/ ~/mnt -o port=2222,password_stdin
    
  • use rsync to backup all files
    $ rsync -avH --progress ~/mnt/storage/extSdCard/DCIM .
    
  • passwordless login
@lyshie
lyshie / gitbook-to-rpm.md
Last active Jul 17, 2018
Convert GitBook from deb to rpm (tested on Fedora 26/27)
View gitbook-to-rpm.md

Convert deb to rpm

$ sudo alien -r --keep-version gitbook-editor-7.0.12-linux-x64.deb
$ rpmrebuild -pe gitbook-editor-7.0.12-1.x86_64.rpm

Delete unnecessary lines in rpm spec

Requires:      libnode.so()(64bit)
Requires:      libffmpeg.so()(64bit)
@lyshie
lyshie / terminal_free_20ms_before.py
Last active Dec 27, 2017
Micro:bit hangs at read_analog() - MicroPython
View terminal_free_20ms_before.py
# Add your Python code here. E.g.
from microbit import *
uart.init(115200)
x = 0
pin0.write_analog(80)
sleep(1000)
while True:
You can’t perform that action at this time.