Skip to content

Instantly share code, notes, and snippets.

View dsewnr's full-sized avatar
⛰️
LNT

Peter Lu dsewnr

⛰️
LNT
View GitHub Profile
@dsewnr
dsewnr / speedup_trackpoint.sh
Last active May 2, 2018 06:25
Script to Speed Up TrackPoint for Thinkpad X1 Carbon 5th Gen
#!/bin/bash
# obtain TrackPoint ID from xinput list
TP_ID=$(xinput list | grep TrackPoint | cut -f 2 | grep -Eo '[0-9]{1,}')
if [ -n "$TP_ID" ]; then
# obtain properties from xinput list-props "$TP_ID"
AS_ID=$(xinput list-props "$TP_ID" | grep 'libinput Accel Speed (' | cut -f 2 | grep -Eo '[0-9]{1,}')
# set the speed you want
xinput set-prop "$TP_ID" "$AS_ID" 1
@dsewnr
dsewnr / .shellrc
Created April 20, 2018 15:11
pbcopy & pbpaste in Linux
# Install xclip and add below lines to your shell rc file.
alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'
@dsewnr
dsewnr / .fonts.conf
Last active April 20, 2018 15:02
Linux User Font Config ( Solve Ugly Chinese Font in Telegram Desktop )
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<dir>~/.fonts</dir>
<match target="font">
<edit mode="assign" name="antialias">
<bool>true</bool>
</edit>
</match>
<alias>
@dsewnr
dsewnr / 不自殺聲明.txt
Last active November 22, 2017 09:08
不自殺聲明
本人在此特地聲明:
本人樂觀開朗,身體健康,無任何使我困擾之慢性病或心理疾病,故絕不可能做出任何看似自殺之行為。
本人從無睡眠困擾,故不需服用安眠藥。
本人不酗酒亦不吸毒,也絕不會接近下列地點──
開放性水域
無救生員之游泳池
有高壓、危險氣體,或密閉式未經抽氣處理之地下室、蓄水池、水桶等
無安全護欄之任何高處