Skip to content

Instantly share code, notes, and snippets.

View corners.pde
// "corners" by dave
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
View Impressionism revisited...
float[][] noiseMap;
ArrayList<Brush> brushes;
PImage imgMap;
int num = 500, min=2, max=50;
float noiseIncr = .01, drain=.05, brushSize;
void setup() {
imgMap = loadImage("http://everythingforpeople.files.wordpress.com/2011/11/7098-natalie-portman-black-and-white-earrings-closeup-face.jpg");
imgMap.resize(round(imgMap.width*0.5),round(imgMap.height*0.5));
@mantissa
mantissa / instanced.frag
Last active Aug 9, 2018
Demonstrates how to use perform rotations on instances drawn with ofVBOMesh::drawInstances(). Also uses per pixel lighting and color.
View instanced.frag
#version 120
#extension GL_EXT_gpu_shader4 : require
varying vec3 vertex_light_position;
varying vec3 vertex_normal;
void main(){
// calculate the shading based on the normal
float diffuse_value = max(dot(vertex_normal, vertex_light_position), 0.0);
@captbaritone
captbaritone / UserSongs.plist
Created Aug 21, 2013
Chord changes from iRealb
View UserSongs.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>chordProgression</key>
<string>*A[T44F^7 Ab7 |Db^7 E7 |A^7 C7 |C-7 F7 |Bb^7 Db7 |Gb^7 A7 |D-7 G7 |G-7 C7 ]*A[F^7 Ab7 |Db^7 E7 |A^7 C7 |C-7 F7 |Bb^7 Ab7 |Db^7 E7 |A^7 C7 |F^7 ]*B[C-7 F7 |E-7 A7 |D^7 F7 |Bb^7 |Eb-7 |Ab7 |Db^7 |G-7 C7 ]*A[F^7 Ab7 |Db^7 E7 |A^7 C7 |C-7 F7 |Bb^7 Ab7 |Db^7 E7 |A^7 C7 |F^7 Z</string>
<key>composer</key>
<string>Coltrane John</string>
<key>keySignature</key>
@ccstone
ccstone / BBEdit-TextWrangler_RegEx_Cheat_Sheet.txt
Last active Jan 19, 2023
BBEdit-TextWrangler Regular Expression Cheat-Sheet
View BBEdit-TextWrangler_RegEx_Cheat_Sheet.txt
————————————————————————————————————————————————————————————————————————————————————————————————————
BBEdit / BBEdit-Lite / TextWrangler Regular Expression Guide Modified: 2018/08/10 01:19
————————————————————————————————————————————————————————————————————————————————————————————————————
NOTES:
The PCRE engine (Perl Compatible Regular Expressions) is what BBEdit and TextWrangler use.
Items I'm unsure of are marked '# PCRE?'. The list while fairly comprehensive is not complete.
@shtirlic
shtirlic / mono.rb
Last active May 21, 2017
Latest mono formula for homebrew
View mono.rb
# http://www.mono-project.com/Compiling_Mono_on_OSX
require 'formula'
class Mono < Formula
#url 'http://download.mono-project.com/sources/mono/mono-3.0.6.tar.bz2'
#sha1 'e2187f80366fcd65c55a1ab946f8d3b39e81be77'
url 'http://download.mono-project.com/sources/mono/mono-2.10.9.tar.bz2'
sha1 '1a6e8c5a0c3d88d87982259aa04402e028a283de'
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active Jan 27, 2023
OS X Screencast to animated GIF
View GIF-Screencast-OSX.md

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: