I hereby claim:
- I am jacobk on github.
- I am jacobk (https://keybase.io/jacobk) on keybase.
- I have a public key whose fingerprint is 2A25 3F53 549E 70A2 9F11 48AC 13FB CA84 42F8 3AC6
To claim this, I am signing this object:
| var RSVP = require('rsvp'), | |
| GitHubApi = require("github"), | |
| _ = require('lodash'), | |
| argv = require('minimist')(process.argv.slice(2)), | |
| github = new GitHubApi({ | |
| // required | |
| version: "3.0.0", | |
| // optional |
I hereby claim:
To claim this, I am signing this object:
| App.ComposeRoute = Ember.Route.extend({ | |
| model: function() { | |
| return this.ensureMessage(); | |
| }, | |
| createMessage: function() { | |
| var transaction = this.get('store').transaction(), | |
| message = transaction.createRecord(App.Message, {}); | |
| return message; | |
| }, |
| Ember.Handlebars.registerBoundHelper('naivePluralize', function(count, word) { | |
| return count === 1 ? word : word + 's'; | |
| }); |
| ├ app/config.js | |
| │ | |
| ├ app/em.js | |
| │ ├─ jquery | |
| │ ├─ use!underscore | |
| │ ├─ use!backbone | |
| │ ├─ use!handlebars | |
| │ └─ use!plugins/backbone.layoutmanager | |
| │ | |
| ├ app/main.js |
| # Metadata lookup for youtube links | |
| # | |
| # <youtube link> - returns info about the link | |
| # | |
| module.exports = (robot) -> | |
| robot.hear youtube.link, (msg) -> | |
| msg.http(youtube.uri msg.match[1]).get() (err, res, body) -> | |
| if res.statusCode is 200 | |
| data = JSON.parse(body) |
| # Flip things!!! | |
| # | |
| # flip <something> - Flips something | |
| # flip <something>, <something else>, ... - Flips all the things | |
| # FLIP!?|flip! <something> - Really flips something | |
| module.exports = (robot) -> | |
| robot.respond /FLIP( ME)? (.*)/, (msg) -> | |
| msg.send flip_angry(msg.match[2]) |
| #!/usr/bin/env bash | |
| FORCE=false | |
| while getopts f o; do | |
| case $o in | |
| f) FORCE=true;; | |
| esac | |
| done |
| # Get money donated to musikhjälpen 2011 | |
| # | |
| # show me the money - returns how much money that has been donated | |
| # | |
| module.exports = (robot) -> | |
| robot.respond /(show me the money|mh)/i, (msg) -> | |
| msg.http("http://sverigesradio.se/p3/musikhjalpen/xml/ticker.htm") | |
| .get() (err, res, body) -> | |
| if res.statusCode is 200 |
| # Make sure people know who saw it first! | |
| # | |
| # TODO | |
| # * Figure out how to properly check content (hash) | |
| # - perhaps only usable for images | |
| # * Make it possible to post link you know is old | |
| # * List last links | |
| # * List most posed links | |
| # * Test if a link has been posted before |