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
create = { | |
handler: function(request, reply) { | |
return new Address().save({ | |
name: request.payload.name, | |
address_line1: request.payload.address_line1 | |
}).then(function(model) { | |
return new Address({ | |
'id': model.id | |
}).fetch().then(function(model) { | |
return reply(model); |
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 request = require('request'); | |
request.get(' https://www.goodreads.com/book/isbn_to_id', | |
{ | |
form: { | |
key: '********', | |
isbn: '9780060513030' | |
} | |
}, function(err, response, body) { | |
if(err) { |
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 is the versioning config file | |
[ | |
{ | |
"id": "2014-01-01", | |
"features": [ | |
{ | |
"name": "rename_setting_id", | |
"description": "rename setting_id to setting on objects endpoint" | |
} |
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 City = bookshelf.Model.extend({ | |
tableName: 'city' | |
}); | |
var User = bookshelf.Model.extend({ | |
tableName: 'people', | |
city: function() { | |
return this.hasOne(City); | |
} | |
}); |
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
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Be sure to read the README! | |
" shortcuts: | |
" ; maps to : | |
" ,a: ack from the current directory | |
" ,b: browse tags | |
" ,c: toggle comments | |
" ,C: toggle block comments | |
" ,nt: open file in new tab | |
" ,l: toggle NERDTree |
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
Show hidden characters
{ | |
"requireSpacesInsideObjectBrackets" : "all", | |
"requireCurlyBraces" : [ | |
"if", | |
"else", | |
"for", | |
"while", | |
"do", | |
"try", | |
"catch", |
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
# Install Brew | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# ImageMagick | |
wget http://ftp.sunet.se/pub/multimedia/graphics/ImageMagick/ImageMagick-6.8.9-5.tar.gz | |
tar xvzf ImageMagick-6.8.9-5.tar.gz | |
cd ImageMagick-6.8.9-5 | |
./configure | |
make | |
sudo make install |
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
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5:prepare (default-cli) on project lob-java: Unable to commit files | |
[ERROR] Provider message: | |
[ERROR] The git-push command failed. | |
[ERROR] Command output: | |
[ERROR] fatal: remote error: | |
[ERROR] You can't push to git://github.com/lob/lob-java.git | |
[ERROR] Use https://github.com/lob/lob-java.git |
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 Bluebird = require('bluebird'); | |
var Hapi = require('hapi'); | |
var Server = new Hapi.Server(); | |
Server.connection({ port: 3000 }); | |
Server.method('pAdd', function (a, b) { | |
return Bluebird.resolve(a + b); | |
}); |
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
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Be sure to read the README! | |
" shortcuts: | |
" ; maps to : | |
" ,a: ack from the current directory | |
" ,b: browse tags | |
" ,c: toggle comments | |
" ,C: toggle block comments | |
" ,nt: open file in new tab | |
" ,l: toggle NERDTree |
OlderNewer