Skip to content

Instantly share code, notes, and snippets.

View mspivak's full-sized avatar

Mauro Spivak mspivak

  • Buenos Aires, Argentina
View GitHub Profile
@bad-mushroom
bad-mushroom / post-receive deploy
Created March 28, 2014 23:11
post-receive hook for deploying site based on branch. "master" is pushed to the production site, "development" to the test site.
#!/bin/bash
echo '--- --- --- --- --- --- --- --- --- --- ---'
echo 'Deploying site...'
echo '--- --- --- --- --- --- --- --- --- --- ---'
if ! [ -t 0 ]; then
read -a ref
fi
IFS='/' read -ra REF <<< "${ref[2]}"
@hsiboy
hsiboy / bounce.ino
Created January 16, 2015 13:46
WS2811 - bounce using FastLed
// stolen from https://github.com/fibonacci162
#include <FastLED.h>
#define LED_PIN 13 // hardware SPI pin SCK
#define NUM_LEDS 250
#define COLOR_ORDER RGB
#define LED_TYPE WS2811
#define MAX_BRIGHTNESS 255 // watch the power!
#define GRAVITY -9.81 // Downward (negative) acceleration of gravity in m/s^2