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
extern crate hyper; | |
use hyper::Server; | |
use hyper::server::{Request, Response}; | |
fn handle(_: Request, res: Response) { | |
res.send(b"Hello World!").unwrap(); | |
} | |
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
# Comment | |
PROMPT='%{$fg[white]%}☁ %{$fg[blue]%}%c %{$fg[red]%}$(git_prompt_info)%{$reset_color%}: ' | |
RPROMPT='%{$fg[white]%}%n@%m%{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_PREFIX="" | |
ZSH_THEME_GIT_PROMPT_SUFFIX=" " | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%} ☯" | |
ZSH_THEME_GIT_PROMPT_CLEAN="" |
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
func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell! { | |
let kCellName = "SearchResults" | |
var cell: UITableViewCell? // allow nil value for cell | |
cell = tableView.dequeueReusableCellWithIdentifier(kCellName) as? UITableViewCell // allow for nil value on first lookup | |
if(cell == nil) { | |
cell = UITableViewCell(style: UITableViewCellStyle.Subtitle, reuseIdentifier: kCellName) | |
} | |
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
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(); | |
} | |
}); |
NewerOlder