Skip to content

Instantly share code, notes, and snippets.

@natw
natw / fizzbuzz.py
Created Nov 15, 2012
best fizzbuzz
View fizzbuzz.py
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)]
View keybase.md

Keybase proof

I hereby claim:

  • I am natw on github.
  • I am natw (https://keybase.io/natw) on keybase.
  • I have a public key ASBT7ion3qJJS_tc-rEQ2VWdnAtSrH-bM8JNJjFtap1lXQo

To claim this, I am signing this object:

View gist:5680529
<action>
<app>vr</app>
<parameters>
<id>11263534</id>
</parameters>
</action>
View 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
View tef.md

VikingofRock posted:

Could someone explain that tef post to someone who doesn't know any ruby whatsoever?

yes, but if you're asking me then i'll have to explain to you how ruby works.

well, explain my current understanding of how ruby works. i'm never really sure if i've reached the bottom of the rabbit hole.

let's open with one description of ruby http://blade.nagaokaut.ac.jp/cgi-bi...179642?matzlisp

Matz posted:

@natw
natw / gist:2431781
Created Apr 20, 2012
~/Library/KeyBindings/DefaultKeyBinding.dict
View gist:2431781
{
"^w" = "deleteWordBackward:";
}
View lpp_versions
#!/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"
View finder.sh
#!/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"
View foo.pl
print eval '"'.
('{'^"\[").(
('{')^ '[').('{'^'[').
('{'^'['). ('{'^'[').('{'^'['
).('{'^'[' ).('{' ^'[').('{'^'[').('{'
^'[').('{'^'[').('{' ^'[').'_'.('{'^"\[").(
'{'^'[').('{'^"\[").( '{'^'[').('{'^'[').('{'
^'[').('{'^('[')).( '{'^'[').('{'^'[').('_').(
View bar.pl
#!/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
You can’t perform that action at this time.