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
void rect(Rectangle r) { | |
rect(r.x, r.y, r.width, r.height); | |
} |
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
void poly(Polygon p) { | |
beginShape(); | |
for (int i=0; i<p.npoints; i++) { | |
vertex(p.xpoints[i], p.ypoints[i]); | |
} | |
endShape(CLOSE); | |
} |
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
fill(0); | |
ellipse(250, 250, 200, 175); | |
fill(255); | |
ellipse(210, 240, 30, 30); | |
ellipse(290, 240, 30, 30); | |
fill(0); | |
ellipse(210, 240, 15, 15); | |
ellipse(290, 240, 15, 15); | |
fill(255); |
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
#!/usr/bin/env ruby | |
require 'yaml' | |
require 'fileutils' | |
require 'mysql' | |
class Transcoder | |
#Path to tools | |
@@MENCODER = "/usr/local/bin/mencoder" | |
@@MPLAYER = "/usr/local/bin/mplayer" | |
@@FFMPEG = "/opt/local/bin/ffmpeg" |
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
#!/bin/bash | |
# create a new tab in terminal using a random style setting | |
osascript -e 'tell application "Terminal"'\ | |
-e 'activate'\ | |
-e 'set s to some item of (the name of every settings set as list) as text'\ | |
-e 'end tell'\ | |
-e 'tell application "System Events"'\ | |
-e 'tell process "Terminal"'\ |
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
#!/bin/bash | |
mencoder $1 -o $1.mp4 \ | |
-vf dsize=480:320:2,scale=-8:-8,harddup \ | |
-oac faac -faacopts mpeg=4:object=2:raw:br=128 -channels 1 -srate 44100 \ | |
-of lavf -lavfopts format=mp4 \ | |
-ovc x264 -x264encopts bitrate=256:nocabac:level_idc=30:bframes=0:global_header:threads=auto:partitions=all \ | |
-ofps 15 |
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
static String[] args; | |
int r = 0; | |
int g = 0; | |
int b = 0; | |
void setup() { | |
if (args != null && args.length == 3) { | |
// all args are strings so we need to convert to ints | |
r = parseInt(args[0]); |
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
<?php | |
$names = array( | |
'Allison', | |
'Arthur', | |
'Ana', | |
'Alex', | |
'Arlene', | |
'Alberto', | |
'Barry', |
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
#!/usr/bin/ruby | |
# creates a todo in Thing's Inbox for each line in the selection | |
# set input as selected text or nothing | |
ENV['TM_SELECTED_TEXT'].split("\n").reverse_each do |line| | |
system("osascript \ | |
-e 'tell application \"Things\"' \ | |
-e ' set newToDo to make new to do ¬' \ |
OlderNewer