Skip to content

Instantly share code, notes, and snippets.

@wkliang
wkliang / trigger.sh
Last active January 10, 2024 06:54
raspberry pi 5 sysfs + udev to control gpio
#!/bin/bash
if [ $1 == 'CH1' ] ; then # gpio 26, PIN37
ch=425
elif [ $1 == 'CH2' ] ; then # gpio 20, PIN38
ch=419
elif [ $1 == 'CH3' ]; then # gpio 21, PIN40
ch=420
else
echo "Parameter error"
@wkliang
wkliang / 00-usememo.md
Last active December 6, 2025 09:08
20251206 try github gist

Created by Memo App

20251206 (gist)

This gist was created by note taking app; memo (usememo.com) and is not intended to be editted.

To read your notes and make changes, please go to usememo.com and use either our browser app or desktop app. Also you can see your notes in MD format in the following sub gists, by their sheet ids.

從2012到2022年間,輝達的單晶片AI推論效能加速了一千倍,遠遠超越摩爾定律預期的成果。然而其中,大概只有兩倍半的加速來自電晶體;剩下的四百倍多半都是出自輝達的數學工具。「老實說,AMD能做的晶片並不輸我們,」 輝達的硬體工程總監阿爾瓊.普拉布說:「但他們就是沒辦法把運算速度提高到跟我們一樣快。」

@wkliang
wkliang / ek21-bookmark-let.js
Created October 11, 2016 18:42
ek21 bypass noisy script
javascript:(function(e, s) {
e.src = s;
e.onload = function() {
alert('gist injected');
};
document.head.appendChild(e);
})(document.createElement('script'), 'https://gist.githubusercontent.com/anonymous/d6004fc355bf7c4a41cbfa3d746c350e/raw/591a1c972b33dbef58bdeed7b95560d80b547e85/ek21.js');