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 Main = function () { | |
this.index = function (req, resp, params) { | |
this.respond(params, { | |
format: 'json' | |
}); | |
}; | |
this.test1 = function (req, resp, params) { | |
this.respond(params, { | |
format: 'json' |
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
upstream zerb_blarg { | |
server 127.0.0.1:4000; | |
} | |
server { | |
listen 80; | |
server_name www.zerb-blarg.org zerb-blarg.org; | |
access_log /var/log/nginx/zerb_blarg.access.log; | |
location / { | |
proxy_pass http://zerb_blarg; | |
} |
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 Zoobies = function () { | |
this.respondsWith = ['json', 'js', 'xml]; | |
this.create = function (req, resp, params) { | |
var self = this | |
, zooby = geddy.model.Zooby.create(params); | |
if (!zooby.isValid()) { | |
params.errors = zooby.errors; | |
// Figure out how you want to respond with an error |
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
function filterGhNotifications() { | |
var sourceLabel = GmailApp.getUserLabelByName('GH'); | |
var addedLabel = GmailApp.getUserLabelByName('GH -- mde'); | |
var pat = /@mde/; | |
var threads; | |
var foundThreads = []; | |
threads = sourceLabel.getThreads(0, 20); | |
threads.forEach(function (thread) { | |
var messages = thread.getMessages(); | |
var subject; |
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
// Application controller | |
var Application = function () { | |
this.before(function () { | |
geddy.log.info('setting foo'); | |
this.foo = 'BAR'; | |
}); | |
}; |
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
mdes-mbp-2:bar mde$ ../geddy/bin/cli.js scaffold zooby | |
[Added] app/models/zooby.js | |
Creating table for Zooby | |
[Added] test/zooby.js | |
[Added] app/controllers/zoobies.js | |
[Added] Resource zoobies route added to config/router.js | |
jake aborted. | |
TypeError: ejs:10 | |
8| <div class="row list-item"> | |
(See full trace by running task with --trace) |
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
git clone git@github.com:mde/geddy.git | |
cd geddy | |
npm install | |
cd .. | |
./geddy/bin/cli.js app foo | |
cd foo | |
../geddy/bin/cli.js auth | |
../geddy/bin/cli.js |
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
git clone git@github.com:mde/geddy.git | |
cd geddy | |
checkout -t origin/passport-integration | |
mkdir node_modules | |
npm install | |
cd .. | |
git clone git@github.com:mde/geddy-passport.git | |
cd geddy-passport | |
npm install | |
../geddy/bin/cli.js |
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
---- (somewhere in the page head) ---- | |
<script type="text/javascript"> | |
yam.connect.loginButton('#yammer-login', function (resp) { | |
if (resp.authResponse) { | |
document.getElementById('yammer-login').innerHTML = 'Welcome to Yammer!'; | |
} | |
}); |
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 Item = function () { | |
this.defineProperties({ | |
name: {type: 'string'} | |
}); | |
this.findByName = function (name, callback) { | |
geddy.model.Item.all({name: name}, callback); | |
} | |
} |