Skip to content

Instantly share code, notes, and snippets.

View tkuwill's full-sized avatar
👋
HI

tkuwill

👋
HI
View GitHub Profile
nmcli con add \
type wifi \
con-name "eduroam" \
ifname "wlan0" \ #based on your device
ssid "eduroam" \
wifi-sec.key-mgmt "wpa-eap" \
802-1x.identity "STUDENT-NUMBER@tku.edu.tw" \
802-1x.password "YOURPASSWORD" \
802-1x.system-ca-certs "no" \
802-1x.domain-suffix-match "tku.edu.tw" \
@meeech
meeech / a_help-osx-borked-my-nix.md
Last active June 5, 2024 11:14
Some steps to (hopefully) help you fix your Nix install on OS X after an upgrade.

Apple Borked my Nix!

Ok, so you've had nix (home-manager) working fine. Then Apple tells you it's time to update.

Ok. Reboot. Oops. It has now broken your Nix setup. Here's some stuff to work through. YMMV.

Note: This is what worked for me, who was just using nix + home-manager. The upgrade that I last did that caused all these issues was 12.3.X > 12.4

Useful Links

@brandon1024
brandon1024 / BatteryStatusNotification.scpt
Last active April 21, 2024 07:09
Battery Percentage Boundary Notification Background Script for macOS
repeat
set chargeState to do shell script "pmset -g batt | awk '{printf \"%s %s\\n\", $4,$5;exit}'"
set percentLeft to do shell script "pmset -g batt | egrep -ow '([0-9]{1,3})[%]' | egrep -ow '[0-9]{1,3}'"
considering numeric strings
if chargeState contains "Battery Power" and percentLeft ≤ 40 then
display notification "Time to plug me in :)" with title "Battery Charge Boundary"
else if chargeState contains "AC Power" and percentLeft ≥ 80 then
display notification "Time to unplug me :)" with title "Battery Charge Boundary"
end if
end considering