Skip to content

Instantly share code, notes, and snippets.

View zombiecalypse's full-sized avatar

Aaron Karper zombiecalypse

View GitHub Profile
@zombiecalypse
zombiecalypse / twitter-gender.rb
Created September 25, 2014 19:10
A script estimating the gender distribution of a twitter user's people they follow.
#!/usr/bin/env ruby
#
# A script to approximate the gender distribution of your twitter follows.
#
# gem install guess t
#
# ruby twitter-gender.rb USERNAME
#
# Firstly outputs a list of estimations of the gender of all people that user
# follows.
@zombiecalypse
zombiecalypse / gist:b940545fd7bc02a53f1e
Created June 25, 2014 09:53
Deadlock with syncthing
[K4YXK] 11:43:25 INFO: syncthing v0.8.16-2-gf97dd9d (go1.2.1 linux-amd64 default) aaron@fairlight-excalibur 2014-06-23 19:57:22 UTC
[K4YXK] 11:43:25 INFO: My ID: K4YXKXC6TQJL2YIU2PVELUH56R73AFITFSBVR4VWXUU6PCX4LH2A
[K4YXK] 11:43:25 INFO: Starting web GUI on http://127.0.0.1:9990/
[K4YXK] 11:43:25 INFO: Populating repository index
panic: deadlock detected
goroutine 7 [running]:
runtime.panic(0x70b960, 0xc210093ec0)
/usr/lib/go/src/pkg/runtime/panic.c:266 +0xb6
github.com/calmh/syncthing/model.func·011()
@zombiecalypse
zombiecalypse / vim-html-markdown
Created June 24, 2014 22:12
Editing Google Docs locally as markdown with vim
#!/bin/sh
# Use as google docs edit --title "Reviews Regex Parse" --editor vim-html-markdown --format htm
file=$1
markdown=`tempfile --suffix=.mdown`
# Convert to markdown with pandocs
pandoc "$file" -f html -t markdown -o $markdown
# Edit the markdown file
@zombiecalypse
zombiecalypse / gist:5995898
Created July 14, 2013 20:37
D3 visualisation of participation in a github project
Array::unique = ->
output = {}
output[@[key]] = @[key] for key in [0...@length]
value for key, value of output
user = "ese-unibe-ch"
repo = "ese2012-team5"
url = "https://api.github.com/repos/#{user}/#{repo}/commits?per_page=1000"
$(document).ready ->
@zombiecalypse
zombiecalypse / mandelbrot.cpp
Created June 25, 2013 20:33
A stupid way to compute the mandelbrot iteration in Halide (https://github.com/halide/Halide).
/*
* Build as
* g++ mandelbrot.cpp -I /path/to/Halide/include -I /path/to/Halide/apps /path/to/libHalide.a \
* -o mandel -lpthread -ldl -L/usr/lib/x86_64-linux-gnu -lpng12 -I/usr/include/libpng12
*/
#include <Halide.h>
using namespace Halide;
#include <support/image_io.h>
#include <time.h>