Skip to content

Instantly share code, notes, and snippets.

@alum
alum / index.js
Last active August 29, 2015 13:57
Sequelize test of incorrect count() with included relations
/*
To run:
1. npm install sequelize
2. npm install mysql (or whatever you use)
3. edit username and password below
4. node index.js
*/
jahaja
min egen gaffel
@alum
alum / hack.sh
Created April 2, 2012 13:38 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
echo "Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)"
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
@alum
alum / gist:1916680
Created February 26, 2012 13:20
till fredrik
import time
def main():
start = time.time()
input_data = []
while(True):
try:
read_input = raw_input()
if(read_input != ''):
input_data.append(read_input)
@alum
alum / binarytree.py
Created February 24, 2012 17:20
Binary tree in python
class BinaryNode:
def __init__(self, data):
self.left = None
self.right = None
self.data = data
class BinaryTree:
''' A Binary Tree class '''
def __init__(self):
self.root = None