Joshua Peek josh

View gist:11218565

"I think we're in this world I'd like to call Guard Rail Programming... 'I can make change because I have tests!' Who does that? Who drives their car around, banging against the guard rails? Do the guard rails help you get to where you want to go?" - Rich Hickey

http://www.infoq.com/presentations/Simple-Made-Easy

View await.js
1 2 3 4 5
function^ find() {
var id = await Promise.resolve(123);
var data = await findInMemoryOrDb(id);
return data;
}
View amd.js
1 2 3 4
define('app', ['jquery', 'underscore'], function($, _) {
function start() {}
return { start: start };
});
View keybase.md

Keybase proof

I hereby claim:

  • I am josh on github.
  • I am joshpeek (https://keybase.io/joshpeek) on keybase.
  • I have a public key whose fingerprint is E14C 2D9D 2154 FF22 F2DB 5B41 2852 ABCC 729F 67DA

To claim this, I am signing this object:

View throttled_input.coffee
1 2 3 4 5 6 7 8 9 10
# Throttled Input event
#
#= provides throttled:input
#
#= require jquery
#
# Delays firing `input` event until user is done typing.
#
# ### Events
#
View compare-page-dimensions.js
1 2 3 4 5 6 7 8 9 10
var webpage = require('webpage');
var url = phantom.args[0];
 
function renderPage(url, javascriptEnabled, callback) {
var page = webpage.create();
page.settings.javascriptEnabled = javascriptEnabled;
page.open(url, function() {
callback(page.renderBase64('PNG'));
});
}
View build-gem.sh
1 2 3 4 5 6 7 8 9 10
#!/bin/sh
set -e
 
mkdir -p lib/coffee_script
 
cake build:browser
mv extras/coffee-script.js lib/coffee_script/coffee-script.js
 
cat << ERUBY > lib/coffee_script/source.rb
module CoffeeScript
View index.html
1 2 3 4 5 6 7 8 9
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- http://www.backalleycoder.com/2012/04/25/i-want-a-damnodeinserted/ -->
<script>
var styles = document.createElement('style');
styles.type = 'text/css';
document.head.appendChild(styles);
View ready.html
1 2 3 4 5 6 7 8 9 10
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="./ready.js"></script>
<script>
document.ready.then(function() {
console.log('READY!');
});
</script>
View ie11-crash.html
1 2 3 4 5 6 7 8 9
<!DOCTYPE html>
<html>
<body>
<table>
<tbody></tbody>
</table>
<script>
var observer = new MutationObserver(function() {});
observer.observe(document, {childList: true, subtree: true});
Something went wrong with that request. Please try again.