This file contains hidden or 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
# ensure DBUS_SESSION_BUS_ADDRESS and DISPLAY is set | |
git commit -am "`rhythmbox-client --print-playing-format "%ta - %tt @ %te"`" |
This file contains hidden or 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
#!/bin/zsh | |
function json_escape(){ | |
echo -n "$1" | python -c 'import json,sys; print json.dumps(sys.stdin.read())' | |
} | |
function json_escape_file() { | |
cat $1 | python -c 'import json,sys; print json.dumps(sys.stdin.read())' | |
} | |
SLACK_URL="https://hooks.slack.com/services/bla/bla/bla" |
This file contains hidden or 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
#!/bin/zsh | |
SUMMARY=`curl -Ls "http://en.wikipedia.org/wiki/Special:Search?search=${*// /+}" | grep "<p>.*<\/p>" | head -n 1 | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | sed -E 's/\[[^>]{1,2}\]//g'` | |
echo -n $SUMMARY | |
if [ -n "$SUMMARY" ]; then echo; fi; | |
[ -n "$SUMMARY" ] |
This file contains hidden or 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
sed "s/^$SUB\t$RECORD\t.*/$SUB\t$RECORD\t$ADDRESS/g" |
This file contains hidden or 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<script type="text/x-handlebars-template"> | |
<ul> | |
{{#each items}} |
This file contains hidden or 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
// NeoPixel Ring simple sketch (c) 2013 Shae Erisson | |
// released under the GPLv3 license to match the rest of the AdaFruit NeoPixel library | |
#include <Adafruit_NeoPixel.h> | |
// Which pin on the Arduino is connected to the NeoPixels? | |
#define PIN 3 | |
// How many NeoPixels are attached to the Arduino? | |
#define NUMPIXELS 1 |
This file contains hidden or 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
/* | |
* WiFlyHQ Example httpserver.ino | |
* | |
* This sketch implements a simple Web server that waits for requests | |
* and serves up a small form asking for a username, then when the | |
* client posts that form the server sends a greeting page with the | |
* user's name and an analog reading. | |
* | |
* This sketch is released to the public domain. | |
* |
This file contains hidden or 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
from time import * | |
import RPi.GPIO as GPIO | |
GPIO.setmode(GPIO.BOARD) # Use physical layout as reference pins | |
MATRIX = [[1, 2, 3, "A"], | |
[4, 5, 6, "B"], | |
[7, 8, 9, "C"], | |
["*", 0, "#", "D"]] | |
ROW = [13, 15, 19, 21] |
This file contains hidden or 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
from time import * | |
import RPi.GPIO as GPIO | |
GPIO.setmode(GPIO.BOARD) # Use physical layout as reference pins | |
MATRIX = [[1, 2, 3, "A"], | |
[4, 5, 6, "B"], | |
[7, 8, 9, "C"], | |
["*", 0, "#", "D"]] | |
ROW = [13, 15, 19, 21] |
This file contains hidden or 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
var dnsd = require('dnsd'); | |
var server = dnsd.createServer(handler); | |
server.zone('addr.eurica.eu.org', 'eurica.eu.org', '[email protected]', 'now', '2h', '30m', '2w', '10m'); | |
server.listen(5354); | |
console.log("Server running at " + server.ip + ":" + server.port); | |
function handler(req, res) { | |
var question = res.question[0]; | |
var hostname = question.name; |