Skip to content

Instantly share code, notes, and snippets.


Nick Brook nrbrook

View GitHub Profile
nrbrook /
Last active Apr 10, 2018
A python script to extract the events from SI Labs native_gecko.h into an event loop handler that calls weak functions, allowing you to define event handler functions with parameters instead of a big switch statement with an event data struct.
#!/usr/bin/env python
import re
native_gecko_file = open("/Applications/Simplicity", "r")
contents =
pattern = re.compile(r'gecko_evt_(.*?)_id\s')
View addKey
# in ~/Library/LaunchAgents/com.user.addkeyonlogin.plist (replace <path to home>)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<string><path to home>/.ssh/addkeyonlogin</string>
You can’t perform that action at this time.