-
Install the latest version of xcode from the App Store
-
Install the xcode command line tools. How To Guide
-
XCode no longer ships with gcc-4.2 as a separate executable as gcc is version 4.2. Therefore you need to symlink it so that ruby can find gcc-4.2.
sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2
This file contains hidden or 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
# Convert any YouTube video into an audio file you can listen to on the go, using: | |
# http://rg3.github.com/youtube-dl/ | |
{ ~ } > brew install ffmpeg | |
{ ~ } > brew install ffprobe | |
{ ~ } > wget https://raw.github.com/rg3/youtube-dl/2012.02.27/youtube-dl | |
{ ~ } > chmod u+x youtube-dl | |
# Pick which video format you want to download.. (use any YT video link) |
This file contains hidden or 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
name := "DES and AES encryption in Scala" | |
version := "1.0" | |
scalaVersion := "2.9.1" | |
libraryDependencies += "commons-codec" % "commons-codec" % "1.6" |
This file contains hidden or 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
require 'aws-sdk' | |
require 'uuid' | |
require 'pry' | |
uuid = UUID.new | |
dynamo_db = AWS::DynamoDB.new(:access_key_id => "AKIAJLGFC545YHHWOD3A", :secret_access_key => "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") | |
dynamo_db.tables.each { |t| puts t.name } | |
tweets_db = dynamo_db.tables["tweets"] |
This file contains hidden or 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 | |
echo "removing old versions installed by homebrew" | |
brew remove macvim | |
rm /usr/local/bin/mvim | |
echo "Downloading MacVim Application" | |
cd ~/Downloads | |
curl -L "https://github.com/downloads/b4winckler/macvim/MacVim-snapshot-64.tbz" -o macvim.tbz |
This file contains hidden or 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
require 'mongo' | |
require 'tweetstream' | |
db = Mongo::Connection.new("dbh13.mongolab.com", "27137").db("ch-diabetes-demo") | |
auth = db.authenticate("surfandcode", "irNwHfB3udTEpk9z") | |
collection = db.collection("diabetic_tweets") | |
stream = TweetStream::Client.new("commithealth", "SDSF202e") |
This file contains hidden or 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
#configuration for my bash prompt | |
prompt_function() { | |
local BLACK='\[\033[0;30m\]' | |
local LIGHT_BLACK='\[\033[1;30m\]' | |
local RED='\[\033[0;31m\]' | |
local LIGHT_RED='\[\033[1;31m\]' | |
local GREEN='\[\033[0;32m\]' | |
local LIGHT_GREEN='\[\033[1;32m\]' | |
local YELLOW='\[\033[0;33m\]' | |
local LIGHT_YELLOW='\[\033[1;33m\]' |
This file contains hidden or 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
<script src="//platform.twitter.com/widgets.js" type="text/javascript"></script> | |
<div> | |
<a href="https://twitter.com/share" class="twitter-share-button" | |
data-url="https://dev.twitter.com/pages/tweet_button" | |
data-via="your_screen_name" | |
data-text="Checking out this page about Tweet Buttons" | |
data-related="anywhere:The Javascript API" | |
data-count="vertical">Tweet</a> | |
</div> |
- Download the latest version of the git source
curl -O http://git-core.googlecode.com/files/git-1.7.6.4.tar.gz
- unpack git source
tar -xzf git-1.7.6.4.tar.gz
This file contains hidden or 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
require 'goliath' | |
require 'em-hiredis' | |
class EventGenerator < Goliath::API | |
def response(env) | |
redis = EM::Hiredis.connect | |
redis.subscribe(:one) |