Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am rjackson on github.
  • I am rwjblue (https://keybase.io/rwjblue) on keybase.
  • I have a public key whose fingerprint is 623E 12D0 AF52 FDE1 C17A 977A B3D1 0EF8 171F 7219

To claim this, I am signing this object:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.1/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.3.0/handlebars.min.js"></script>
@rwjblue
rwjblue / broccoli-graph.js
Created May 8, 2014 00:23
Detailed graphs of broccoli build times...
var broccoli = require('broccoli');
var tree = broccoli.loadBrocfile();
var builder = new broccoli.Builder(tree);
var result;
builder.build()
.then(function(hash) {
console.log('\n\n10%')
printSlowTrees(hash.graph, 0.1);
console.log('\n\n5%')
var runCommand = require('../helpers/run-command');
var childProcess = require('child_process');
function ifHasGit(callback) {
return new Promise(function(resolve) {
childProcess.exec('git --version', function(error){
if (!!error) {
callback();
}
})
app.registry.add('css', {
toTree: function(tree, inputPath, outputPath, options) {
// broccoli-compass doesn't like leading slashes
if (inputPath[0] === '/') { inputPath = inputPath.slice(1); }
return compileCompass(tree, inputPath + '/app.scss', {
outputStyle: 'expanded',
require: 'sass-css-importer', // Allows us to import CSS files with @import("CSS:path")
sassDir: inputPath,
imagesDir: 'images',

Keybase proof

I hereby claim:

  • I am rwjblue on github.
  • I am rwjblue (https://keybase.io/rwjblue) on keybase.
  • I have a public key whose fingerprint is 623E 12D0 AF52 FDE1 C17A 977A B3D1 0EF8 171F 7219

To claim this, I am signing this object:

@rwjblue
rwjblue / blerg.js
Last active August 29, 2015 14:06 — forked from rondale-sc/blerg.js
function randomDeck(player, n) {
var store = player.store;
var deck = player.get('deck');
var r, promises = [];
return store.findAll('card')
.then(function(cards){
var lastIndex = cards.get('length') - 1;
for(var i = 0; i < n; i++) {
r = randomInt(lastIndex);
@rwjblue
rwjblue / Brocfile.js
Last active August 29, 2015 14:06 — forked from VinSpee/Brocfile.js
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var rework = require('broccoli-rework');
var reworkTree = rework('app/styles', { use: function(css) {
var calc = require('rework-calc');
var customMedia = require('rework-custom-media');
var inliner = require('rework-npm');
var vars = require('rework-vars');
Ember Version: 1.10.0-beta.1+canary.c5e14445
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36
.------------------------------------------------------------------.
| Ember Performance Suite - Results |
|------------------------------------------------------------------|
| Name | Speed | Error | Samples | Mean |
|---------------------------|----------|--------|---------|--------|
| Baseline: Object Create | 43561.77 | 1.19 | 91 | 0 |
| Baseline: Render List | 483.66 | 2.39 | 148 | 2.07 |
test("Tour next, back, and cancel builtInButtons work", function(assert) {
assert.expect(6);
visit('/').then(function() {
assert.equal($('body.shepherd-active').length, 1, "Body gets class of shepherd-active, when shepherd becomes active");
assert.equal($('.shepherd-enabled').length, 2, "attachTo element and tour get shepherd-enabled class");
assert.equal($('#shepherdOverlay').length, 1, "#shepherdOverlay exists");
click('.shepherd-enabled .next-button');
//$("a:contains('Next'):visible")[0].click();
assert.equal($("a:contains('Back'):visible").length, 1, "Ensure that the back button appears");
click('.shepherd-enabled .back-button');