Skip to content

Instantly share code, notes, and snippets.

View austinbv's full-sized avatar
🎯
Focusing

Austin austinbv

🎯
Focusing
View GitHub Profile
> var Person = require('./person');
> var p = new Person.Person();
> p
{ name: 'austin', age: 0 }
{
"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",
@austinbv
austinbv / local_npm_path.zsh
Created June 23, 2012 02:02
load local nodes to path
precmd () {
if [[ -d ./node_modules && -d ./node_modules/.bin ]]
then
export PATH="`pwd`/node_modules/.bin:$PATH"
fi
}
_.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;
};
class Fixnum
def clamp(range)
return range.include?(self) ? self : self > range.max ? range.max : range.min
end
end
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.on('foo1', bar1)
.on('foo2', bar2)
.on('foo3', bar3)
.on('foo4', bar4)
app/
spec/
site/
index.html
$.ajax({
url:"https://www.googleapis.com/oauth2/v1/tokeninfo",
data:{
access_token:sessionStorage.getItem('accessToken'),
},
method:'GET',
dataType:'jsonp',
<!--<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>