This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
def partition(num, group): | |
parts = dict() | |
m = int(num / group) | |
r = num - m * group | |
parts = [m + 1] * (r) + [m] * (group - r) |
請安裝「封鎖內容農場」或「終結內容農場」,當您不小心連結到內容農場時,將會出現警告頁面避免繼續閱讀。
進一步在 Google 搜尋結果中排除內容農場,建議安裝「uBlacklist」,並將「內容農場」網站清單匯入,之後就再也不會出現在搜尋結果了。
建議封鎖清單
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
youtube-dl --write-sub --sub-lang en --sub-format vtt --embed-subs -f 137+140 'https://youtu.be/wCio_xVlgQ0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
from os import geteuid | |
from scapy.all import * | |
#check for root | |
if geteuid() != 0: | |
print("This must be run as root") | |
exit(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
setxkbmap -option grab:break_actions | |
xdotool key XF86Ungrab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
def newBoard(board): | |
full_board = ['-'] * 9 | |
full_board[:len(board)] = board[:len(board)] | |
return full_board | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
chars=$(cat ../10.txt | fold -w1 | sort | uniq) | |
for c in $chars; do | |
convert -background none -fill red -font /opt/local/fonts/lyshie/TW-Kai-98_1.ttf -pointsize 64 label:"$c" "$c.png" | |
done |