Skip to content

Instantly share code, notes, and snippets.

@wiedi
wiedi / latitude.py
Created December 7, 2012 19:09 — forked from bluemaex/latitude.py
Convert a Google Latitude JSON-File to a GPX-File
#!/usr/bin/env python
import os
import simplejson
import subprocess
import datetime
f = open('latitude.json', 'r')
locdata = simplejson.loads(f.read());
fd = open('latitude.gpx', 'w')
@wiedi
wiedi / gist:8470251
Created January 17, 2014 08:45
json2html python template tag
from django import template
from django.utils.safestring import mark_safe
from django.utils.html import conditional_escape
register = template.Library()
def json2html(val):
out = ''
if type(val) == list:
out += '<ul>'
@wiedi
wiedi / gist:fb09a0317e0db2caee6a
Created June 10, 2014 08:49
handlebars helper to iterate by sorted object keys
Handlebars.registerHelper('eachSorted', function(context, options) {
var ret = ""
Object.keys(context).sort().forEach(function(key) {
ret = ret + options.fn({key: key, value: context[key]})
})
return ret
})
@wiedi
wiedi / timelapse.sh
Last active August 29, 2015 14:02
Timelapse
#!/bin/bash
set -x
if [ $# -ne 4 ]; then
echo "Usage:"
echo -e "\t${0} <startframe> <pics> <audio> <out>"
echo
echo "Example:"
echo -e "\t${0} 42 DSC_%d.jpg track.flac timelaps.mp4"
exit 0
fi

Keybase proof

I hereby claim:

  • I am wiedi on github.
  • I am wiedi (https://keybase.io/wiedi) on keybase.
  • I have a public key whose fingerprint is 5DB8 1190 6B8F 5E95 57DB FEDF 455C F4EC A996 776D

To claim this, I am signing this object:

Starting dhcpd with "dhcpd -6 -f" fails with a valid /etc/resolv.conf in irs_resconf_load with the error:
------
Internet Systems Consortium DHCP Server 4.3.0
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
irs_resconf_load failed: 59.
Unable to complete ddns initialization
on run {input}
set the_path to POSIX path of input
-- run vim command and exit Terminal.app after close
set cmd to "vim " & quoted form of the_path & "; exit"
tell application "System Events" to set terminalIsRunning to exists application process "Terminal"
tell application "Terminal"
-- Open new Tab if Terminal.app is already running
if terminalIsRunning is true then
activate
tell application "System Events" to tell process "Terminal" to keystroke "t" using command down
diff --git a/security/spiped/files/smf/manifest.xml b/security/spiped/files/smf/manifest.xml
index a1bbb54..4efeee9 100644
--- a/security/spiped/files/smf/manifest.xml
+++ b/security/spiped/files/smf/manifest.xml
@@ -17,6 +17,11 @@
<property_group name="application" type="application"></property_group>
+ <property_group name="startd" type="framework">
+ <propval name="duration" type="astring" value="child"/>
@wiedi
wiedi / isc-dhcp4-4.3.1b1.diff
Created July 11, 2014 20:48
pkgsrc update for isc-dhcpd 4.3.1b1 (beta)
diff --git a/net/isc-dhcp4/Makefile.common b/net/isc-dhcp4/Makefile.common
index 9aaaa96..6cd87b2 100644
--- a/net/isc-dhcp4/Makefile.common
+++ b/net/isc-dhcp4/Makefile.common
@@ -17,7 +17,7 @@ LICENSE= isc
CONFLICTS+= isc-dhcp-base-3.*{,nb*}
-VERSION= 4.3.0
+VERSION= 4.3.1b1
pkgin install isc-dhcpd
#####
cat > /opt/local/etc/dhcp/dhcpd.conf <
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet6 fdad:e34f:f1d0::/64 {