Skip to content

Instantly share code, notes, and snippets.

size(160 * 3, 160 * 3);
PImage img;
colorMode(RGB, 5);
img = loadImage("gray_5.jpg");
loadPixels();
float cms = 0;
int a = 0;
int b = 0;
### Keybase proof
I hereby claim:
* I am z3a on github.
* I am z3a (https://keybase.io/z3a) on keybase.
* I have a public key whose fingerprint is 1010 1056 2E42 E256 A5E8 F256 DDD7 9BFC F67E 9B87
To claim this, I am signing this object:
@z3a
z3a / gist:3405354
Created August 20, 2012 15:57
node.js gitignore
*.swp
lib-cov
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz
@z3a
z3a / gist:3520037
Created August 29, 2012 23:02
twitter desde id
long ultimo_tweet = 0;
searchResult = twitter.search("#testing", ultimo_tweet);
for (int i=0; i<searchResult.size(); i++) {
Tweet t = (Tweet)searchResult.get(i);
String user = t.getFromUser();
String msg = t.getText();
Date d = t.getCreatedAt();
ultimo_tweet = t.getId();
println(id);
@z3a
z3a / gist:3643654
Created September 5, 2012 20:02
regex
#regex
def findNumber(path):
reGex = re.compile('\d+')
match = reGex.search(path)
return match.group()
long previous;
int interval = 400;
void setup(){
previous = 0;
}
void draw(){
long current = millis();
String response = "Hello 1,2345 10 lorem ipsum 12 dol 34 sit 093 at bla 8749";
void setup(){
String[][] test = matchAll(response, "([1-4])");
if (test != null){
for (int i = 0; i<test.length; i++){
println("text: "+test[i][1]);
}
} else {
for i in *.JPG; convert -resize 10% $i $i:r.png
%!TEX TS-program = xelatex
\documentclass[12pt]{scrartcl}
% The declaration of the document class:
% The second line here, i.e.
% \documentclass[12pt]{scrartcl}
% is a standard LaTeX document class declaration:
% we say what kind of document we are making in curly brackets,
% and specify any options in square brackets.