This file contains hidden or 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
| class Acccount | |
| def to_param | |
| slug | |
| end | |
| end | |
This file contains hidden or 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
| # Automatically add mustaches to any images it can | |
| # | |
| # | |
| module.exports = (robot) -> | |
| robot.hear /^(https?:\/\/[^ #]+\.(?:png|jpg|jpeg))(?:[#]\.png)?$/i, (msg) -> | |
| src = msg.match[1] | |
| unless src.match(/^http:\/\/mustachify.me/) | |
| msg.http("http://stacheable.herokuapp.com") |
This file contains hidden or 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
| # a little wrapper on yaml/store to give collection and record access to a | |
| # transaction yaml store. | |
| # | |
| # sample usage | |
| # | |
| # require 'ydb' | |
| # | |
| # db = Db.new | |
| # | |
| # collection = db.collection(:posts) |
This file contains hidden or 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
| Found this tip in comment here: http://www.tipb.com/2011/01/04/tipb-bug-home-button-working-iphone/ | |
| 1.) Open any application | |
| 2.) Press and hold the power button until the slide to shutdown swipe bar appears. | |
| 3.) Release Power button | |
| 4.) Press and hold Home button Lightly | |
| until screen returns to icon screen |
This file contains hidden or 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
| // includes bindings for fetching/fetched | |
| PaginatedCollection = Backbone.Collection.extend({ | |
| initialize: function() { | |
| _.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage'); | |
| this.page = 1; | |
| }, | |
| fetch: function(options) { | |
| options || (options = {}); | |
| this.trigger("fetching"); |
This file contains hidden or 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
| class A | |
| def implicit_block_implicit_ensure | |
| begin | |
| "block" | |
| ensure | |
| "ensure" | |
| end | |
| end | |
| def implicit_block_explicit_ensure |
NewerOlder