I hereby claim:
- I am davidjbeveridge on github.
- I am davidjbeveridge (https://keybase.io/davidjbeveridge) on keybase.
- I have a public key whose fingerprint is 9D0B 4BC5 447D 567B 781F 444A 10FE 4DB3 1D93 A65E
To claim this, I am signing this object:
| var asciiChars = `qwertyuiop[]\asdfghjkl;'zxcvbnm,./QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?`; | |
| var dvorakChars = `',.pyfgcrl/=\aoeuidhtns-;qjkxbmwvy"<>PYFGCRL?+|AOEUIDHTNS_:QJKXBMWVY`; | |
| function ascii2dvorak(str) { | |
| return str.replace(/./g, function (ch) { | |
| var index = asciiChars.indexOf(ch); | |
| if(index === -1) return ch; | |
| return dvorakChars.charAt(index); | |
| }) | |
| } |
| class Lambda < Proc | |
| def initialize(&block) | |
| @block = block | |
| end | |
| def >> (g) | |
| Lambda.new {|*args| g[*self[*args]]} | |
| end |
I hereby claim:
To claim this, I am signing this object:
| (function() { | |
| function bufferUrl(url, title) { | |
| baseUrl = "http://bufferapp.com/add?"; | |
| return [baseUrl, | |
| "url=", | |
| encodeURIComponent(url), | |
| "&text=", | |
| encodeURIComponent(title) | |
| ].join(''); | |
| } |
| (function(Y, memoize){ | |
| return (function(range, map, fib) { | |
| return function(a, b) { | |
| return map(fib, range(a, b)); | |
| }; | |
| })( | |
| Y(function(range, a, b, inc) { | |
| inc = inc || 1; | |
| if(a === b) return [a]; | |
| return [a].concat(range(range, a+1, b)); |
I hereby claim:
To claim this, I am signing this object:
| // Some assertion functions we can play with | |
| function assert(condition, message) { | |
| if(!condition) { | |
| throw new Error(message); | |
| } | |
| } | |
| function assert_equal(obj1, obj2) { | |
| assert(obj1 === obj2, 'Expected '+obj1+' to equal '+obj2+'.'); | |
| } |
| // Some assertion functions we can play with | |
| function assert(condition, message) { | |
| if(!condition) { | |
| throw new Error(message); | |
| } | |
| } | |
| function assert_equal(obj1, obj2) { | |
| assert(obj1 === obj2, 'Expected '+obj1+' to equal '+obj2+'.'); | |
| } |
| /** Write a function that will emulate the behavior of the `new` operator. I | |
| * should be able to pass it a constructor function and some arguments, and get | |
| * back an instance of it. Here's a test case; just fill in the | |
| * `createInstance` function. | |
| * | |
| * You can just run the code to see if it works; if it doesn't work, assert will | |
| * throw errors. | |
| * | |
| * To run it, just use `node create_instance.js` | |
| */ |
Use this handy javascript snippet to add an "Add to Buffer" bookmark. Then you can add anything to your Buffer, anytime, all without leaving the page.
First, copy the following into your clipboard (it's the attached Javascript, but formatted as a bookmarklet):
javascript:(function()%7Bfunction%20c(a%2Cb)%7BbaseUrl%3D%22%2F%2Fbufferapp.com%2Fadd%3F%22%3Breturn%20baseUrl%2B%22url%3D%22%2Bd(a)%2B%22%26text%3D%22%2Bd(b)%7Dvar%20d%3DencodeURIComponent%3Bc(window.location.href%2Cwindow.document.title)%3Bvar%20a%3Ddocument.createElement(%22iframe%22)%3Ba.setAttribute(%22style%22%2C%22width%3A%20900px%3B%20height%3A%20500px%3B%20position%3A%20fixed%3B%20top%3A%2050%25%3B%20left%3A%2050%25%3B%20margin-left%3A%20-450px%3B%20margin-top%3A%20-250px%3B%20background%3A%20%23fff%3B%20border%3A%20solid%201px%20%23000%3B%20z-index%3A%201000%3B%22)%3Ba.setAttribute(%22frameborder%22%2C%220%22)%3Burl%3Dc(document.location.href%2Cdocument.title)%3Ba.src%3Durl%3Bdocument.body.a