- Run software update
- Download & install XCode in App Store
- Install Google Chrome and enable syncing -- ensure 3rd party cookies are disabled
- Install homebrew
brew install git
brew install wget
- Copy ssh keys
git clone git@github.com:rmurphey/dotfiles.git
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 | |
echo -n "gitsh% " | |
while read line; do | |
if [[ "$line" == ":exit" ]]; then | |
exit | |
fi | |
sh -c "git $line" | |
echo -n "gitsh% " |
-
Download [jshint.vim][jshint]
-
Put it in
~/.vim/plugin/jshint.vim
-
Edit your local vimrc file (I'm on macvim with janus, so it's at
~/.gvimrc.local
) and add:au BufWritePost *.js :JSHint
-
Read the [vim docs][vim] and particularly [auto commands][auto] I'm a newb and the neckbeards are probably laughing at me for even posting this.
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
var cat = {}; | |
/** | |
* cat.NewsBox | |
* Retrieves news from Google | |
*/ | |
cat.NewsBox = (function(){ | |
function NewsBox(searchTerm, injectFn) { | |
this.searchTerm = searchTerm; |
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
#Steps to install RVM + Ruby 1.9.2 + Rails + nginx + Passenger on CentOS (tested on v5.5) | |
# Install git and curl, if not already installed | |
sudo yum install git | |
sudo yum install curl | |
# Create the rvm group and add any users who will be using rvm to the group | |
sudo su - | |
groupadd rvm |
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
{ | |
"aed": { | |
"priority": 100, | |
"iso_code": "AED", | |
"name": "United Arab Emirates Dirham", | |
"symbol": "د.إ", | |
"subunit": "Fils", | |
"subunit_to_unit": 100, | |
"symbol_first": true, | |
"html_entity": "", |
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
// To test this code in Firefox, I encourage you to use Firefox Aurora | |
// and to include your script this way: | |
// <script type="application/javascript;version=1.8"> | |
// (necessary to make `let` work) | |
/* let ********************************************* */ | |
// let is the new var :) | |
// Declares a block scope local variable |
I'm re-evaluating my thoughts on constructor based dependencies vs setter dependencies in JavaScript. I'm trying to see if the same reasons we avoid setter injection in static language like C# and Java still apply in JavaScript.
In other words, why is this:
var a = new A();
var b = new B();
var c = new C(a, b);
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 is in response to https://gist.github.com/Peeja/5284697. | |
// Peeja wanted to know how to convert some callback-based code to functional | |
// style using promises. | |
var Promise = require('rsvp').Promise; | |
var ids = [1,2,3,4,5,6]; | |
// If this were synchronous, we'd simply write: |
OlderNewer