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
Browser.select = function(css, val) { | |
this.element(css).click(); | |
return this.element(css).findElements(By.css('option')).then(function(els) { | |
for(var i = 0, el; el = els[i]; ++i) { | |
var element = el; | |
el.getText().then(function(text) { | |
if(text == val) { | |
element.click(); | |
} | |
}); |
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
/*surgeon-file: /Users/ryan/Dev/spotlight/spotlight/lib/emails/email-layout.styl: 87 */ | |
body#email { | |
font-size: 1em; | |
font-family: 'Helvetica Neue', 'Helvetica'; | |
font-weight: 200; | |
background-color: #39434a; | |
padding: 20px 20px; | |
} | |
... more email stuffs |
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
[color] | |
branch = auto | |
diff = auto | |
status = auto | |
[color "branch"] | |
current = yellow reverse | |
local = yellow | |
remote = green |
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
User.prototype.votesCastInOpportunity = function(opp) { | |
var result = _.reduce(opp.entries(), function(sum, entry) { return sum + this.votesCastOnEntry(entry); }, 0, this); | |
debugger; | |
return 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
var extend = require('extend'); | |
module.exports = function(Track) { | |
Track.present = { | |
forSmallApi: { plays: 0, comments: 0, updatedAt: 0, hearts: 0 } | |
}; | |
Track.on('initialize', function(instance) { | |
var presenter = { | |
smallApiSummary: function(user) { | |
var hearted = false; |
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
//components/access-control/access-control.js | |
var isBrowser = require('is-browser'); | |
var userRoles = exports.userRoles = { | |
anon: 1, | |
user: 2, | |
admin: 4 | |
}; |
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 stylPlugin = module.exports.stylPlugin = require('component-styl-plugin'); | |
var variables = require('rework-variant'), | |
grid = require('rework-grid'), | |
shade = require('rework-shade'), | |
rework = require('rework'); | |
var gridConfig = { | |
numColumns: 24, | |
width: 1140, |
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 randomWord = require('wiki-random-word'), | |
facebook = require('facebook'); | |
randomWord.then(facebook.postToMyWall); |
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 every = require('every'). | |
randomWikiWord = require('./word-of-day'). | |
automon = require('automon'); | |
automon.config = require('./config.json') | |
every('day', randomWikiWord); |
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
mixin fieldGroup(model, name, label, type) | |
-var type =type || text | |
div.field-group(data-field=name) | |
label= label | |
if type!= 'textarea' | |
input(type=type, name=name, value=model[name]()) | |
else | |
textarea(name=name, value=model[name]()) |
NewerOlder