Skip to content

Instantly share code, notes, and snippets.

View flyingoctopus's full-sized avatar

Vincent van Haaff flyingoctopus

  • flyingoctopus
  • Vancouver, BC
View GitHub Profile
@flyingoctopus
flyingoctopus / Gemfile
Created December 12, 2013 01:33 — forked from pcreux/Gemfile
group :production do
gem 'unicorn'
# Enable gzip compression on heroku, but don't compress images.
gem 'heroku-deflater'
# Heroku injects it if it's not in there already
gem 'rails_12factor'
end
@flyingoctopus
flyingoctopus / emily2.pde
Last active December 27, 2015 20:59
even simpler
int pinCount = 4; // the number of pins
int thisPin;
void setup() { // set up the app
for (int thisPin = 1; thisPin <= pinCount ; thisPin++) {
setupPin(thisPin);
}
}
void loop()
void setup() {
Serial.begin(115200);
for (int i = 1; i <= 12; i++) {
/* Set pins 12-18 to output, and strobe them to test. */
pinMode(i, OUTPUT);
digitalWrite(i, HIGH);
delay(100);
digitalWrite(i, LOW);
}
}
void setup() {
Serial.begin(115200);
for (int i = 12; i <= 18; i++) {
/* Set pins 12-18 to output, and strobe them to test. */
pinMode(i, OUTPUT);
digitalWrite(i, HIGH);
delay(100);
digitalWrite(i, LOW);
}
}
@flyingoctopus
flyingoctopus / breathe.pde
Last active December 27, 2015 16:59
just breath
/*
Breathing sleep LED, like on a Mac.
Vincent van Haaff
LED is attached to pin 11 in series with a 5.6K resistor
*/
int i = 0;
void setup() { // bring the LED up nicely from being off
for(i = 0 ; i <= 15; i+=1)
{
@flyingoctopus
flyingoctopus / loopyloop.js
Created September 16, 2013 20:37
loop ALL THE THINGS! \o/
// make sure this executes at the end of your page
// and note that this is the recommended way because you dont want to clog the thread
// (all browsers are single threaded, except for chrome where each tab is a single process) and you'll have a frozen webpage.
<script type="text/javascript" charset="utf-8">
$(document).ready(function()
{
setInterval(function(){
$('#additionalthumb1 a').Chocolat();
},1000); // set a value for this in milliseconds.
});
let mapleader=","
set t_Co=256
filetype off
filetype plugin indent on
set nocompatible
" Tabs/spaces
set tabstop=2
set shiftwidth=2
let mapleader=","
set t_Co=256
filetype off
filetype plugin indent on
set nocompatible
" Tabs/spaces
set tabstop=2
set shiftwidth=2
gist --login
//VARS
var _stage,
_lineGroup,
_lineHolder,
_stats,
_camera,
_scene,
_renderer,
_mouseX = 0,
_mouseY = 0,