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
<?xml version="1.0" standalone='no'?> | |
<!DOCTYPE service-group SYSTEM "avahi-service.dtd"> | |
<service-group> | |
<name replace-wildcards="yes">%h</name> | |
<service> | |
<type>_adisk._tcp</type> | |
<txt-record>sys=waMa=0,adVF=0x100</txt-record> | |
<txt-record>dk0=adVN=Time Capsule,adVF=0x82</txt-record> | |
</service> | |
<service> |
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
get_latest_release() { | |
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api | |
grep '"tag_name":' | # Get tag line | |
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value | |
} | |
# Usage | |
# $ get_latest_release "creationix/nvm" | |
# v0.31.4 |
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
// I2C to USB Adapter using Arduino | |
// by Bernhard Kraft <kraftb@think-open.at> | |
/** | |
* This sketch can get loaded onto an Arduino to use it as USB to I2C Adapter. | |
* It uses the Wire library. So take a look at the documentation of the Wire | |
* libarary about the pins being used as SDA/SCL. For most Arduino boards this | |
* will be analog input pin 4 for SDA and analog input pin 5 for SCL. | |
* | |
* On the USB side the default serial link of the Arduino is used. A protocol |
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 python | |
# encoding: utf-8 | |
""" | |
django.cgi | |
A simple cgi script which uses the django WSGI to serve requests. | |
Code copy/pasted from PEP-0333 and then tweaked to serve django. | |
http://www.python.org/dev/peps/pep-0333/#the-server-gateway-side |