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
#!/usr/bin/env node | |
var q = require('q'); | |
var exec = require('child_process').exec; | |
var exit = process.exit; | |
var fs = require('fs'); | |
var readline = require('readline'); | |
var grep = function(pattern) { | |
var dfd = q.defer(); |
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 BaseView = require('../base'), | |
FeedView = require('../feed'); | |
module.exports = BaseView.extend({ | |
className: 'home_index_view', | |
postRender: function() { | |
this.feed = new FeedView({ collection: this.options.feed, | |
app: this.app}); | |
this.$('.feed-wrapper').html(this.feed.render().el); |
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
" Pathogen | |
set nocompatible | |
set laststatus=2 " Always show the statusline | |
set encoding=utf-8 " Necessary to show Unicode glyphs | |
set t_Co=256 " Explicitly tell Vim that the terminal supports 256 colors | |
filetype off " Pathogen needs to run before plugin indent on | |
call pathogen#runtime_append_all_bundles() | |
call pathogen#helptags() " generate helptags for everything in 'runtimepath' | |
call pathogen#infect() | |
filetype plugin indent on |
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
// controller | |
module.exports = { | |
index: function(params, callback) { | |
var spec = { | |
posts: { collection: 'Posts', params: params }, | |
feed: { collection: 'Feed', params: params }, | |
user: { model: 'User', params: params, ensureKeys: ['name'] }, | |
session: { model: 'Session', params: params } | |
}; | |
this.app.fetch(spec, function(err, result) { |
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
it 'should handle fs.stat errors', (done) -> | |
list = new m.List patterns('/some/*.js'), [], emitter, preprocessMock | |
sinon.stub(fs, "stat").yields([new Error(), null]) | |
expect -> | |
refreshListAndThen() | |
done() | |
.to.not.throw |
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
/* | |
* | |
* Gravy is a small form validation library. | |
* | |
* Used specifically for Venmo's Backbone Env. | |
* | |
* By Julian Connor | |
* | |
*/ | |
Backbone.Gravy = Backbone.View; |
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
for i in `ls | grep -v "@2x"`; | |
do mv $i `echo $i|sed s/\.png/@2x\.png/`; | |
done; |
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.raw_exchange.to_users = JSON.stringify(function() { | |
var obj = []; | |
_.each(targets, function(item) { | |
if ( item.get('active') ) { | |
if ( item.get('email') ) { | |
obj.push({email: item.get('email')}); | |
} else { | |
obj.push({phone: item.get('phone')}); | |
} | |
} |
NewerOlder