Skip to content

Instantly share code, notes, and snippets.

from collections import namedtuple
def flatten(xs):
return sum(xs, [])
Node = namedtuple('Node', 'value children')
def leaf(name):
return Node(name, [])
@weeble
weeble / gist:7241969
Created October 30, 2013 23:18
Zap Twitter images
javascript:(function(){var newcss="a.media-thumbnail { display: none; }";if("\v"=="v"){document.createStyleSheet().cssText=newcss}else{var tag=document.createElement("style");tag.type="text/css";document.getElementsByTagName("head")[0].appendChild(tag);tag[(typeof document.body.style.WebkitAppearance=="string")?"innerText":"innerHTML"]=newcss}})();
@weeble
weeble / script.txt
Last active December 26, 2015 01:39
Tiny Treasure Hunt 1.1
title tiny treasure hunt 1.1
author Weeble
homepage www.twitter.com/weeble
run_rules_on_level_start
(
Release history:
1.0
* First release
title Robot Repairs 1.2
author Weeble
homepage www.twitter.com/weeble
run_rules_on_level_start
again_interval 0.05
key_repeat_interval 0.12
noaction
========
OBJECTS
title Robot Repairs 1.2
author Weeble
homepage www.twitter.com/weeble
run_rules_on_level_start
again_interval 0.05
key_repeat_interval 0.12
noaction
========
OBJECTS
@weeble
weeble / gist:4754719
Created February 11, 2013 14:32
Resize the body element to be 800px wide. Created with http://www.squarefree.com/userstyles/make-bookmarklet.html and tested in Google Chrome only.
javascript:styles='body {width: 800px; margin-left: auto; margin-right: auto; position:relative; margin-top:0;}'; newSS = document.createElement('link'); newSS.rel = 'stylesheet'; newSS.href = 'data:text/css,' + escape(styles); document.documentElement.childNodes[0].appendChild(newSS); void 0