Skip to content

Instantly share code, notes, and snippets.

View hamiltont's full-sized avatar
🕵️‍♂️
huntin' wabbits

Hamilton Turner hamiltont

🕵️‍♂️
huntin' wabbits
View GitHub Profile
# Run the benchmarker in the specified mode
if benchmarker.list_tests == "True":
print "1"
benchmarker.run_list_tests()
elif benchmarker.list_test_metadata == "True":
print "2"
benchmarker.run_list_test_metadata()
elif benchmarker.parse != "None":
print "3"
#include <stdio.h>
#include <unistd.h>
int main()
{
/* fork a child process */
fork();
/* fork another child process */
fork();
/* and fork another */
@hamiltont
hamiltont / dynamic_dnsimple.sh
Created December 18, 2013 05:38 — forked from mislav/dynamic_dnsimple.sh
Using username and password authentication
#!/bin/bash
set -e
domain=mislav.net
record=511770 # mysubdomain.mislav.net
ip="$( curl -s icanhazip.com )"
payload="{ \"record\": { \"content\": \"${ip}\" } }"
curl -fsS --netrc \
@hamiltont
hamiltont / 0_reuse_code.js
Created November 12, 2013 04:42
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@hamiltont
hamiltont / bex2csv.py
Last active December 15, 2021 14:37 — forked from shanewholloway/gist:3536969
Converts Billings 3 Slips into CSV readable. Export entire Slip Log by right-clicking on slips, choosing to export, saving as bex. Run this script in any folders containing the bex files. They will be found, parsed, and the output will be written to a CSV file in the same folder
import csv
import glob
import plistlib
clientProject = 'My Project'
for filename in glob.glob("*.bex"):
root = plistlib.readPlist(filename)
with open(filename+'.csv', 'wb') as out:
out = csv.writer(out, delimiter='|')
out.writerow(['Slip', 'Start', 'End', 'Duration (minutes)'])