I hereby claim:
- I am madbook on github.
- I am madlee (https://keybase.io/madlee) on keybase.
- I have a public key ASAgcSuEBTjxAx8TdD68uTgzgvvWpM3KkXM6uUEHTgTBTQo
To claim this, I am signing this object:
| import random | |
| import time | |
| from r2.lib import websockets | |
| def spew_comments_on_link(link_id36, num_comments=10, delay=.1, start_at_id=1): | |
| """ | |
| Generate a series of fake websocket messages to test live comments | |
| link_id36: id36 of a link, used to namespace the websocket messages | |
| num_comments: how many comments to broadcast |
I hereby claim:
To claim this, I am signing this object:
| function _multiline(fnc) { | |
| return fnc.toString().replace(/^function *\(\) *\{ *\/\* */, '').replace(/ *\*\/ *\} *$/, ''); | |
| } | |
| // example | |
| var template = _multiline(function(){/* | |
| <div id="some_id"> | |
| <h1>Multiline strings without all the bullshit</h1> | |
| <p>This is a pretty terrible hack, probably don't actually do this ever.</p> |
| $('.octicon-issue-closed, .octicon.type-icon-state-closed, .octicon-git-pull-request.type-icon-state-merged').parent().parent().find('button.delete-note').click(); |
| .md | |
| { | |
| max-width:60em | |
| } | |
| .md .-headers, | |
| .md h1, | |
| .md h2, | |
| .md h3, | |
| .md h4, |
| gulp = require 'gulp' | |
| browserify = require 'gulp-browserify' | |
| react = require 'gulp-react' | |
| gulp.task 'scripts', () -> | |
| gulp.src 'src/jsx/app.jsx' | |
| .pipe browserify() | |
| .pipe react() | |
| .pipe gulp.dest 'build/js' |
| function* range(begin, end) { | |
| for (let i = begin; i < end; i++) | |
| yield i; | |
| } | |
| let buzzWord = (n) => | |
| '' + ((n % 3 ? '' : 'fizz') + (n % 5 ? '' : 'buzz') || n) | |
| let fizzBuzz = (max = 100) => | |
| [for (n of range(1, max)) buzzWord(n)] |
| function brainLuck (code, input) { | |
| var interpreter = new BrainLuck(code) | |
| return interpreter.execute(input) | |
| } | |
| function BrainLuck (code) { | |
| // data | |
| this.i = null | |
| this.data = null | |
| // output |
| git ls-tree --name-only -r -z HEAD | egrep -z -Z -E '\.(php|js|html|css)$' | xargs -0 -n1 git blame --line-porcelain | grep "^author " | sort | uniq -c | sort -nr |
| for (i in obj) | |
| if (typeof obj[i] === 'function' && i !== 'toString') | |
| (function (method) { | |
| var fnc = obj[method] | |
| obj[method] = function () { | |
| var x | |
| console.groupCollapsed(this + " -> " + method) | |
| console.dir(this) | |
| console.dir(arguments) | |
| console.time(method + ' time') |