First install the required gems:
gem install octokit awesomeprint rainbow
Then run it to extract all of your open GitHub issues into files (with comments).
ruby my-gh-issues.rb
/* | |
* Karl Westin | |
* Part of the "refactoring javascript for unit testing" blog post | |
*/ | |
function Lightbox(boxcontent, $parent) { | |
this._addElements(boxcontent, $parent); | |
this._autoSize(); | |
this._bindEvents(); | |
} |
// Thoughts about server response for payment/minimum plan | |
// server calls something like | |
/api/accounts/:id // id for example 34667 | |
//getting all the data | |
/api/accounts/all | |
//The exact URL structure is not so important, just whether we can use id's and "all", or if we need smth else :) |
minimum_plan: { | |
metadata: { .... }, | |
graph: [ [21312412, 123], [1231212312, 1123], [1231231, 1231231, { text: "Finished account x" ... }] ] | |
} | |
var highlights = _.select(minimum_plan, function(el) { return !!el[2] }); |
Hi Scott! | |
Well, i have a ton of questions, i realize you can't answer all straight away but maybe some can be discussed in the post :) | |
• How much have you been able to work/week approximately? | |
Like, what's realistic while still enjoying the trip? | |
• Did you split things up between "work weeks" and "travel weeks" or what methods have you tried? | |
• Am I asking pointless questions about separating work/travel and looking for the wrong type of answer? :P |
$.post("/api/web2/authed/bonus-slider", { accountId: 2 }, function(e) { console.log(e) }); |
// underscore's throttle-metod | |
var throttle = function(func, wait) { | |
var context, args, timeout, throttling, more, result; | |
var whenDone = _.debounce(function(){ more = throttling = false; }, wait); | |
return function() { | |
context = this; args = arguments; | |
var later = function() { | |
timeout = null; | |
if (more) func.apply(context, args); |
// this one doesn't throw away any data the user entered, it even keeps the invalid stuff: | |
onError: function(errors) { | |
var data = this.prepare(), | |
triedData = this.getData(); | |
_.extend(data, triedData); | |
data.errors = errors; | |
this.$el.html(this.template(data)); |
/* | |
Are you also tired of people writing in caps for stupid reasons on twitter? | |
My farvorite example is @zerohedge: "FITCH DEGRADES CAMERONS CAT TO BB" and shit like that. | |
Fuck it. | |
Anyway, right click the bookmarks-bar. Find a good name for it. paste the following: | |
*/ | |
javascript:$(".js-tweet-text").each(function(index, el) { var $el = $(el), content = $el.html().toLowerCase(); $el.html(content) }) |
First install the required gems:
gem install octokit awesomeprint rainbow
Then run it to extract all of your open GitHub issues into files (with comments).
ruby my-gh-issues.rb
/* | |
Line 775, tests/model.js | |
https://github.com/documentcloud/backbone/commit/69b80f5e3a86452c4150caa249332f9ea4efd901#L1R737 | |
*/ | |
test("multiple nested changes with silent", 2, function() { | |
var changes = []; | |
var model = new Backbone.Model(); | |
model.on('change:b', function(model, val) { changes.push(val); }); | |
model.on('change', function() { |