$ git checkout -b my-feature
... modify code ....
$ git add <filename>
$ git commit -m “my feature is this”
doSomething: -> | |
d = jQuery.Deferred() | |
doTheWork: -> | |
data = hard() | |
d.resolve(data) | |
# return a promise which has a subset of the methods on a deferred | |
# a promise won't allow you to cancel the deferred for example | |
d.promise() |
fs = require('fs') | |
path = require('path') | |
officegen = require('officegen') | |
pptx = officegen ('pptx') | |
slide = pptx.makeNewSlide() | |
slide.addImage( path.resolve(__dirname, 'mk.jpg' ), { y: 0, x: 0,cy: '100%', cx: '100%' } ) |
#<html> | |
#<head> | |
#<script src="http://codeorigin.jquery.com/jquery-1.10.2.min.js"></script> | |
#<script src="example.js"></script> | |
#</head> | |
#<body> | |
#<h1>Example</h1> | |
#</body> | |
#</html> |
// camel case variable names (no underscores) | |
// instance variables are nouns | |
var myArray = [1, 2, 3]; // space after commas | |
// title case for class names (class names should be nouns) | |
// space before bracket | |
function Widget() { | |
// two spaces for indentation | |
var parameterOne = 1; | |
var parameterTwo = 2; |
SUCCESS_PHRASES = ['all good', 'works for me', 'keep it coming', 'yeah baby', 'i like it', | |
'you\'re good', 'that\'s it', 'nailed it', 'mmm hmmm', 'sweet', 'keep it up', 'yep'] | |
# ... | |
exec: | |
notify_ok: | |
cmd: -> | |
phrase = SUCCESS_PHRASES[Math.round(Math.random()*(SUCCESS_PHRASES.length-1))] | |
"say -v Vicki \"#{phrase}\"" |
# docs here: | |
# https://github.com/nodejitsu/pkgcloud/blob/master/docs/providers/rackspace/storage.md | |
_ = require('underscore') | |
walk = require('walk') | |
pkgcloud = require('pkgcloud') | |
getClient = -> | |
pkgcloud.storage.createClient | |
provider: 'rackspace' | |
username: process.env.RACKSPACE_USERNAME |
# docs here: | |
# https://github.com/nodejitsu/pkgcloud/blob/master/docs/providers/rackspace/storage.md | |
pkgcloud = require('pkgcloud') | |
client = pkgcloud.storage.createClient | |
provider: 'rackspace' | |
username: process.env.RACKSPACE_USERNAME | |
apiKey: process.env.RACKSPACE_API_KEY | |
authUrl: 'https://auth.api.rackspacecloud.com' | |
region: 'ORD' |
# h = {}; Event.all.each { |e| h[e.useragent] = (h[e.useragent] || 0) + 1; } | |
# h.keys.each { |k| puts "#{h[k]},#{k}" | |
class UserAgent | |
# gplus => "Mozilla/5.0 (Windows NT 6.1; rv:6.0) Gecko/20110814 Firefox/6.0" | |
BOTS = [ | |
{ :name => 'AppEngine', :match => 'AppEngine', :url => 'http://code.google.com/appengine'}, | |
{ :name => 'Embedly', :match => 'Embedly', :url => 'http://support.embed.ly/'}, | |
{ :name => 'news.me', :match => 'news.me', :url => ''}, | |
{ :name => 'Voyager', :match => 'Voyager/1.0', :url => ''}, | |
{ :name => 'bitlybot', :match => 'bitlybot', :url => ''}, |
0:31 gandhi recognition award had uh... risen | |
0:35 badminton mind business time | |
0:39 five-second philbin let's get one first exercise will be recertified he has been | |
0:43 attached | |
0:44 one flight and my feet on the ground and i don't understand what we've | |
0:48 accomplished by this time he was a statement at this point when it was a | |
0:52 bob dole's last time i was not based on the ground | |
0:56 finance please and i think years and slowly just before the selling it | |
1:01 billings if there was right | |
1:04 ominous phrase things she described him |