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
> var Person = require('./person'); | |
> var p = new Person.Person(); | |
> p | |
{ name: 'austin', age: 0 } | |
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": "calendar", | |
"version": "0.0.0", | |
"description": "Calendar App for Pivotal Boulder Conference Room Calendar", | |
"main": "index.js", | |
"scripts": { | |
"test": "mocha" | |
}, | |
"author": "Austin Vance", | |
"license": "BSD", |
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
precmd () { | |
if [[ -d ./node_modules && -d ./node_modules/.bin ]] | |
then | |
export PATH="`pwd`/node_modules/.bin:$PATH" | |
fi | |
} |
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
_.rotate = function(array, count) { | |
var array = _.clone(array), | |
count = count || 1; | |
if (Math.abs(count) > array.length/2) count = 0 - count; | |
if (count < 0) | |
while (count++) array.unshift(array.pop()); | |
else | |
while (count--) array.push(array.shift()); | |
return array; | |
}; |
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
class Fixnum | |
def clamp(range) | |
return range.include?(self) ? self : self > range.max ? range.max : range.min | |
end | |
end |
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
class Deck < ActiveRecord::Base | |
def show_card | |
# Why assign to an instance var??? | |
deck.first | |
end | |
def create_deck | |
# again why are you assigning | |
# also arrays have a destructive shuffle method |
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
this.on('foo1', bar1) | |
.on('foo2', bar2) | |
.on('foo3', bar3) | |
.on('foo4', bar4) |
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
app/ | |
spec/ | |
site/ | |
index.html |
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
$.ajax({ | |
url:"https://www.googleapis.com/oauth2/v1/tokeninfo", | |
data:{ | |
access_token:sessionStorage.getItem('accessToken'), | |
}, | |
method:'GET', | |
dataType:'jsonp', |
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='javascripts/lib/zepto-0.8.js' type="text/javascript"></script>--> | |
<script src='javascripts/lib/jquery-1.7.1.js' type="text/javascript"></script> | |
<script src='javascripts/lib/underscore-1.3.1.js' type="text/javascript"></script> | |
<script src='javascripts/lib/backbone-0.9.1.js' type="text/javascript"></script> | |
<script src='javascripts/CalApp.js' type="text/javascript"></script> |