This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
#!/usr/bin/php | |
<?php | |
if (empty($argv[1])) { | |
die("please specify a file\n"); | |
} | |
function is_str($word) { | |
return preg_match('%^".*"$%', $word); | |
} |
own_window yes | |
own_window_transparent yes | |
own_window_argb_visual yes | |
own_window_type normal | |
own_window_class conky-semi | |
own_window_argb_value 40 | |
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager | |
format_human_readable yes | |
double_buffer yes | |
background yes |
package main | |
import ( | |
"fmt" | |
"math/big" | |
) | |
func fibonacciCalculator() func(n int) *big.Int{ | |
cache := map[int]*big.Int{ | |
0: big.NewInt(0), |
<?php | |
// By Kaeru~ | |
require('lib/common.php'); | |
$sql = new mysql; | |
if(!@$sql->connect($sqlhost,$sqluser,$sqlpass)) | |
{ | |
mysqlerror(); | |
} |
window.requestAnimFrame = (function(){ | |
return window.requestAnimationFrame || | |
window.webkitRequestAnimationFrame || | |
window.mozRequestAnimationFrame || | |
window.oRequestAnimationFrame || | |
window.msRequestAnimationFrame || | |
function (callback) { | |
window.setTimeout(callback, 1000 / 60); | |
}; | |
})(); |
#!/usr/bin/env python2 | |
# do: ./noise.py | aplay -c 2 | |
# edited: speed up until too fast | |
import sys | |
import math | |
import random | |
TEMPO=1000 | |
def p(i): |
#!/bin/bash | |
if [ ! -r "$1" ]; then | |
echo "Please provide a valid file." | |
exit 0 | |
fi | |
file="$(<$1)" | |
length="${#file}" | |
speed=4 | |
char_count=0 |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
package com.cascadegames.androidgame; | |
import android.util.Log; | |
import jgame.JGObject; | |
public abstract class GameObject extends JGObject { | |
AndroidGame g; | |
double gravity = 0.9; | |