Skip to content

Instantly share code, notes, and snippets.

@natw
natw / foo.py
Created February 7, 2011 16:08
from jinja2 import Template
source = """
{%- set foo = 'hello' -%}
{%- macro bar(things, oid, attribute) -%}
{%- for thing in things -%}
{%- if thing.offer_id == oid -%}
{{attr thing attribute}}
{%- endif -%}
#!/usr/bin/perl
$_='
$q ="\ 47"; wh
ile ($ ;=
$z += .5 ){
%c= $r=0;$/ ="";whi le(2
0+ $z>($;+=.05)){$c{int$ _+ 2
6+ 2*($ r+= .0 2) *
s in$ ;}{1 -$_
+1 0+ int $r*c o s
print eval '"'.
('{'^"\[").(
('{')^ '[').('{'^'[').
('{'^'['). ('{'^'[').('{'^'['
).('{'^'[' ).('{' ^'[').('{'^'[').('{'
^'[').('{'^'[').('{' ^'[').'_'.('{'^"\[").(
'{'^'[').('{'^"\[").( '{'^'[').('{'^'[').('{'
^'[').('{'^('[')).( '{'^'[').('{'^'[').('_').(
#!/bin/bash
function main() {
for rpath in `repo_paths`; do
url="http://frogbucket$rpath/raw-file/tip/setup.py"
reqs=`req_strings`
if [[ $reqs ]]; then
echo "$rpath"
echo "$reqs" | while read line; do
echo -e "\t$line"
#!/bin/bash
function main() {
for rpath in `repo_paths`; do
url="http://frogbucket$rpath/raw-file/tip/Gemfile.lock"
lines=`core_line`
if [[ $lines ]]; then
echo "$rpath"
echo "$lines" | while read line; do
echo -e "\t$line"
@natw
natw / gist:2431781
Created April 20, 2012 20:44
~/Library/KeyBindings/DefaultKeyBinding.dict
{
"^w" = "deleteWordBackward:";
}
@natw
natw / fizzbuzz.py
Created November 15, 2012 16:22
best fizzbuzz
import random
for i in range(0, 100):
if not i % 15:
random.seed(1178741599)
print [i+1, "Fizz", "Buzz", "FizzBuzz"][random.randint(0,3)]
@natw
natw / books.txt
Last active December 15, 2015 16:08 — forked from jpellerin/books.txt
Guy Gavriel Kay - Under Heaven - 10
Mira Grant - #Newsflesh - 8
Justin Cronin - The Passage / The Twelve - 7
Elizabeth Bear - Range of Ghosts / Shattered Pillars - 8
Jim Butcher - 1st 2 Dresden Files - 8
Howard Andrew Jones - Desert of Souls / Bones of the Old Ones - 9
Scott Lynch - Gentlemen Bastards 1&2 - 9
James S.A. Corey - Expanse 1 & 2 - 9
Vikram Seth - A Suitable Boy - 10
Patrick Rothfuss - Kingkiller 1 & 2 - 7 / 10
@natw
natw / gist:5680529
Last active December 17, 2015 22:18
<action>
<app>vr</app>
<parameters>
<id>11263534</id>
</parameters>
</action>
@natw
natw / .gitignore
Last active August 29, 2015 14:06 — forked from adamgit/.gitignore
#########################
# .gitignore file for Xcode4 / OS X Source projects
#
# Version 2.0
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
# 2013 updates:
# - fixed the broken "save personal Schemes"
#
# NB: if you are storing "built" products, this WILL NOT WORK,