Skip to content

Instantly share code, notes, and snippets.

View micahwalter's full-sized avatar
👋

Micah Walter micahwalter

👋
View GitHub Profile
@micahwalter
micahwalter / daemon.rb
Created September 20, 2011 20:52
simple ruby daemon
#!/usr/bin/ruby
# ---------------------------------------------------------------------
# MODULES
# ---------------------------------------------------------------------
require 'daemonize'
include Daemonize
include Process
# ---------------------------------------------------------------------
# CONFIGURATION
# ---------------------------------------------------------------------
@micahwalter
micahwalter / gist:1189437
Created September 2, 2011 18:38
xcode .gitignore
.DS_Store
*.swp
*~.nib
build/
*.pbxuser
*.perspective
*.perspectivev3
void setup() {
size(700, 483);
}
void draw() {
float[] sinwave = new float[width];
for (int i = 0; i < width; i++) {
float amount = map(i, 0, width, 0, 100*PI);
sinwave[i] = abs(sin(amount));
void setup() {
size(700, 483);
}
void draw() {
float[] sinwave = new float[width];
for (int i = 0; i < width; i++) {
float amount = map(i, 0, width, 0, 10*PI);
sinwave[i] = abs(sin(amount));
void setup() {
size(700, 483);
}
void draw() {
float[] sinwave = new float[width];
for (int i = 0; i < width; i++) {
float amount = map(i, 0, width, 0, 2*PI);
sinwave[i] = abs(sin(amount));
void setup() {
size(700, 483);
}
void draw() {
float[] sinwave = new float[width];
for (int i = 0; i < width; i++) {
float amount = map(i, 0, width, 0, PI);
sinwave[i] = abs(sin(amount));
float[][] a=new float[40][2];
boolean amLooping;
boolean testNoLoopRedraw = false;
void setup() {
size(700,483);
background(0);
}
void draw(){
a[0][0]=mouseX;
PImage img;
int dimension = 0;
void setup() {
size(700, 483);
img = loadImage("arafat-rabin.jpg");
dimension = img.width*img.height;
img.loadPixels();
}
@micahwalter
micahwalter / httpd.conf
Created August 30, 2011 17:47
Turn on Virtual Hosts in Lion
# Add this line to top of /etc/apache2/httpd.conf
NameVirtualHost *:80
$ tar -cvzf [target_filename.tar.gz] [source_folder]
$ tar -xvzf [tar_file]