Skip to content

Instantly share code, notes, and snippets.

/* GTD IV: San Diego
*
*
*/
#include <Wire.h>
#include <Adafruit_MMA8451.h>
#include <Adafruit_Sensor.h>
// This code is an absolute mess :)
import processing.serial.*;
import processing.sound.*;
SoundFile chill;
SoundFile meeting;
SoundFile pewpew;
float redValue = 0; // red value
// RGB Lock
// The player tries to get one LED to match the color of another.
// The pins for the color the player is trying to match
const int GOAL_RED_PIN = 9;
const int GOAL_GREEN_PIN = 10;
const int GOAL_BLUE_PIN = 11;
int redGoal = 0;
@mischa
mischa / LED_Flow.c
Last active September 26, 2016 15:36
const int DELAY = 100;
int LEDS[] = {11, 10, 9, 6, 5, 3};
const int LEDS_COUNT = 6;
void setup() {
Serial.begin(9600);
for(int i=0; i<LEDS_COUNT; i++) {
pinMode(LEDS[i], OUTPUT);
}
@mischa
mischa / hack.sh
Created March 31, 2012 21:35 — forked from erikh/hack.sh
OSX For Hackers
echo "Use current directory as default search scope in Finder"
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
echo "Disable the warning when changing a file extension"
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
# Empty Trash securely by default
defaults write com.apple.finder EmptyTrashSecurely -bool true
echo "Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)"
@mischa
mischa / install-ruby-debug-ubuntu-ruby-1.9.3
Created February 22, 2012 19:44 — forked from fawce/install-ruby-debug-ubuntu-ruby-1.9.3
install for ruby-debug in ruby-1.9.3 and ubuntu
#!/bin/bash
##########IMPORTANT###########################################################################
# This script requires rvm: http://beginrescueend.com/
# Before running this script you must install rvm. This script will install ruby 1.9.3-p0 if it
# is not already. Ruby can take 10 minutes to compile.
# Load RVM into a shell session *as a function*
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
# First try to load from a user install
@mischa
mischa / gist:1828536
Created February 14, 2012 17:45
Hombrew os x lion postgres 9.0 to 9.1 upgrade
Based off of this: https://raw.github.com/gist/1252442/ebd81b8f73fb80f1aa88fe1bbca3c5bcfc0d55d3/gistfile1.txt (which wasn't using homebrew)
unload whatever launch agents you have for postgres
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
make sure pg is stopped
diff --git a/javascript/exercises/time_differences_1.js b/javascript/exercises/time_differences_1.js
new file mode 100644
--- /dev/null
+++ b/javascript/exercises/time_differences_1.js
@@ -0,0 +1,272 @@
+/*
+* Time Differences 1
+* Author: Mischa Fierer
+* Date: 2011-05-14
+*
x.group_by { |e| e }.tap { |hash| hash.map { |element, elements| hash[element] = elements.size } }.sort_by { |e| e.last }.reverse
export EDITOR=vim
alias v='mvim'
alias serv='python -m SimpleHTTPServer'
alias chrome='/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome'
# Rails
alias rs='rails s --debugger'
alias sc='script/console --debugger'
alias rc='rails console --debugger'