Skip to content

Instantly share code, notes, and snippets.

Tim Kersten io41

Block or report user

Report or block io41

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View manjaro, btrfs + luks
# dvorak layout
loadkeys dvorak
export HOSTNAME=thinkpad
export DEVICE=/dev/sda
export EFI_PARTITION=/dev/sda1
export ROOT_PARTITION=/dev/sda2
# as root
timedatectl set-ntp true
View keybase.md

Keybase proof

I hereby claim:

To claim this, I am signing this object:

View root-secretsanta.md

Secret Santa

Title Header

h1.title {
  color: red;
  text-shadow: 2px 2px #A00;
}
bind @browser
@io41
io41 / Makefile
Last active Aug 29, 2015 — forked from kwlzn/Makefile
View Makefile
PYTHON := python2.6
BUILD_DIR := buildtmp
AURORA_CLUSTER := test
AURORA_ROLE := $(shell whoami)
UWSGI_VER = 2.0.4
UWSGI_DIR = uwsgi-$(UWSGI_VER)
UWSGI_FILE = $(UWSGI_DIR).tar.gz
UWSGI_URL = http://projects.unbit.it/downloads/$(UWSGI_FILE)
View udiff.js
/**
* computes the what elements were added to, and removed from, s1
* to obtain s2, where s1 and s2 are assumed to be unordered Array
* possibly with duplicates
* uDiff([1,3], [2,3]) --> {added: [2], removed: [1]}
* uDiff([1,2,3], [2,3,1]) --> {added: [], removed: []}
* uDiff([1,2,1], [1,2,2]) --> {added: [2], removed: [1]}
* @param s1 Array
* @param s2 Array
View reveal.js
history={'data': [
{
'o': 0, /* offset */
'h': 1, /* horizontal slide index */
'v': 0, /* vertical slide index */
},
{
'o': 120,
'h': 2,
'v': 0,
View tts.fish
function tts
set q $argv;
mplayer "http://translate.google.com/translate_tts?ie=UTF-8&q=$q&tl=en&textlen="(math (echo "$q" | wc -m) - 1)"idx=0&total=1&prev=input";
end
@io41
io41 / gist:6592046
Created Sep 17, 2013
Track dom element clicks. Tested on chrome.
View gist:6592046
var getPath = function(el) {
var path = elName = "";
var siblings, siblingId;
while(el && elName != "body") {
elName = el.nodeName.toLowerCase();
siblings = (el.parentNode)?el.parentNode.childNodes:[];
siblingId = 0;
for (var i = 0; i < siblings.length; i++) {
View tree.md

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

View gist:3866348
From home:
Transactions: 1730 hits
Availability: 100.00 %
Elapsed time: 94.71 secs
Data transferred: 0.24 MB
Response time: 0.31 secs
Transaction rate: 18.27 trans/sec
Throughput: 0.00 MB/sec
Concurrency: 5.65
You can’t perform that action at this time.