This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function rule30(in_array) | |
out_array = {} | |
for i=-128,128 do | |
cel = false | |
l=in_array[i] | |
m=in_array[i+1] | |
r=in_array[i+2] | |
if (l and not m and not r) | |
or (not l and m and r) | |
or (not l and m and not r) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print_time=0 | |
function pretty_print(str, x, y) | |
print_time+=0.1 | |
if print_time==60 then print_time=0 end | |
local ymod = (print_time%60)/10 | |
printh(sin(ymod)) | |
for i=-1,1 do | |
for j=-1,1 do | |
print(str, x+i, y+j+sin(ymod)*4, 1) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
semicircs = {} | |
function _init() | |
for i=0,20 do | |
create_semicirc(rnd(128), rnd(128), | |
rnd(1), rnd(1)+rnd(1), | |
rnd(30), flr(rnd(14))) | |
end | |
end | |
function _update() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am mccolgst on github. | |
* I am mccolgst (https://keybase.io/mccolgst) on keybase. | |
* I have a public key whose fingerprint is 30A1 84C8 56B0 CEA5 51AF D6F5 9B23 04D9 1F52 20B7 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script type="text/javascript" src="jquery-1.4.2.min.js"></script> | |
</head> | |
<!-- You need to have a copy of jquery-1.4.2.min.js in the same dir as this gist for it to work --> | |
<body> | |
<a href="#" id="twit">get tweets</a> | |
<ul id="tweets"></ul> | |
<script type="text/javascript"> | |
$('#twit').click(function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import urllib2 | |
from xml.dom import minidom | |
xml = minidom.parse(urllib2.urlopen('http://8bitcollective.com/rss/music')) | |
for it in xml.getElementsByTagName("enclosure"): | |
subprocess.Popen(['wget', it.getAttribute('url')]) |