Skip to content

Instantly share code, notes, and snippets.

@ddierickx
ddierickx / macos-configure-aws-emr-dnsmasq.md
Last active May 7, 2018 14:17
Resolve AWS EMR hostnames on MacOS

To resolve AWS EMR hostnames from your MacOS machine you'll need to install and configure dnsmasq:

brew install dnsmasq

Add the following to /usr/local/etc/dnsmasq.conf

# configure resolution of AWS EMR hostnames
address=/eu-west-1.compute.internal/127.0.0.1
synth-domain=eu-west-1.compute.internal,0.0.0.0,255.255.255.255,ip-
#!/bin/bash
GPIO_PORT=13
HOSTS=(A B C)
for host in ${HOSTS[@]}; do
ping "$host" -c1 > /dev/null
if [ "$?" = "0" ]; then
gpio mode $GPIO_PORT output && gpio write $GPIO_PORT 1
exit 0
@ddierickx
ddierickx / gist:4020212
Created November 5, 2012 20:39
stacktrace
File "/...//website/test.py", line 4, in <module>
o.save()
File "/...//website/store/utils.py", line 13, in save
val = self.__old_save(self, *args, **kwargs)
File "/...//venv/local/lib/python2.7/site-packages/django/db/models/base.py", line 463, in save
self.save_base(using=using, force_insert=force_insert, force_update=force_update)
File "/...//venv/local/lib/python2.7/site-packages/django/db/models/base.py", line 551, in save_base
result = manager._insert([self], fields=fields, return_id=update_pk, using=using, raw=raw)
File "/...//venv/local/lib/python2.7/site-packages/django/db/models/manager.py", line 203, in _insert
return insert_query(self.model, objs, fields, **kwargs)
rvmsudo siriproxy server
address=/guzzoni.apple.com/192.168.0.133
@ddierickx
ddierickx / install-dominiektv.sh
Created February 25, 2012 17:13
Install DominiekTV
cd /home/dominiek/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/siriproxy-0.3.0/plugins
git clone git://github.com/ddierickx/dominiektv.git
@ddierickx
ddierickx / jxmltv.sh
Created February 25, 2012 17:05
JXMLTV
java -jar jxmltv.jar be.telenet
cp xmltv.xml /tmp/jxmltv
@ddierickx
ddierickx / jslife_configure.js
Created February 24, 2012 19:50
JsLife config
var conf = new JSLIFE.configuration.Configuration()
.withHorizontalBlocks(50)
.withUpdateSpeed(40)
.withBackgroundStrokeColor("#CCFFFF")
.withForegroundStrokeColor("#CCFFFF")
.withForegroundColor("#47FF19")
.withBackgroundColor("#19BAFF")
.withInitialState(gosperGliderGun)
.withTargetDivId("canvas");
@ddierickx
ddierickx / fsquerystats_gather.sh
Created February 24, 2012 18:16
Running fsquerystats
python fsquerystats.py colruyt 15 token.txt colruyt_locations.txt out.csv