This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* GTD IV: San Diego | |
* | |
* | |
*/ | |
#include <Wire.h> | |
#include <Adafruit_MMA8451.h> | |
#include <Adafruit_Sensor.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This code is an absolute mess :) | |
import processing.serial.*; | |
import processing.sound.*; | |
SoundFile chill; | |
SoundFile meeting; | |
SoundFile pewpew; | |
float redValue = 0; // red value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
+* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x.group_by { |e| e }.tap { |hash| hash.map { |element, elements| hash[element] = elements.size } }.sort_by { |e| e.last }.reverse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
NewerOlder