Skip to content

Instantly share code, notes, and snippets.

lab.experiment('kittens', function () {
var resultsOfAsync;
lab.before(function (done) {
// set the value
resultsOfAsync = 'awesome stuff';
// Wait 1 second
@jedireza
jedireza / index.js
Created September 18, 2014 19:53
requirebin sketch
// example using the raf module from npm. try changing some values!
var requestAnimationFrame = require("raf")
var canvas = document.createElement("canvas")
canvas.width = 500
canvas.height = 500
document.body.appendChild(canvas)
var context = canvas.getContext("2d")
@jedireza
jedireza / index.js
Created September 18, 2014 19:54
requirebin sketch
var Model = require('ampersand-model');
var Foo = Model.extend({
props: {
keys: {
type: 'object',
default: function () {return {};}
}
},
echo: function () {
function delegate (child) {
// make it happen
return function inner () {
var self = this;
var func = Object.getOwnPropertyNames(this).filter(function (prop) {
return inner === self[prop];
}).pop();
return this[child][func].apply(this[child], arguments);
@jedireza
jedireza / 01-missing.md
Last active August 29, 2015 14:24
Let's land the native FirefoxOS emoji keyboard
@jedireza
jedireza / account-index.jsx
Last active November 5, 2015 05:24
on the client side
/* global window */
var React = require('react/addons');
var ReactRouter = require('react-router');
var Routes = require('./Routes.react');
var MeStore = require('../../stores/Me');
var MeActions = require('../../actions/Me');
var RedirectActions = require('../../actions/Redirect');
var HistoryLocation = ReactRouter.HistoryLocation;
var casper = require('casper').create({
viewportSize: { width: 1024, height: 768 }
});
var rootUrl = 'http://drywall.herokuapp.com/';
casper.start(rootUrl, function() {
this.evaluate(function(){
$('code').remove();
});
This file has been truncated, but you can view the full file.
error: linking with `cc` failed: exit code: 1
note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-L" "/opt/rustpi2/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "/home/rustpi2/source/target/armv7-unknown-linux-gnueabihf/debug/foxbox.0.o" "-o" "/home/rustpi2/source/target/armv7-unknown-linux-gnueabihf/debug/foxbox" "-Wl,--gc-sections" "-pie" "-nodefaultlibs" "-L" "/home/rustpi2/source/target/armv7-unknown-linux-gnueabihf/debug" "-L" "/home/rustpi2/source/target/armv7-unknown-linux-gnueabihf/debug/deps" "-L" "/home/rustpi2/source/target/armv7-unknown-linux-gnueabihf/debug/build/openssl-09576f2f9776fa80/out" "-L" "/opt/rustpi2/x-tools/arm-unknown-linux-gnueabihf/sysroot/usr/lib/arm-linux-gnueabihf" "-L" "/home/rustpi2/source/target/armv7-unknown-linux-gnueabihf/debug/build/openssl-sys-extras-52d5315fb71d3c6d/out" "-L" "/home/rustpi2/source/target/armv7-unknown-linux-gnueabihf/debug/build/rust-crypto-daa20c09deb34369/out" "-L" "/usr/lib" "-L" "/opt/rustpi2/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-Wl,-Bst
@jedireza
jedireza / README.md
Last active February 25, 2016 03:45
ajaxStart and ajaxStop for ampersand-model using the ajaxConfig

Also see the discussion about global ajax settings:

Add support for a global ajaxConfig > Thus far we've just gone for having a base model and base collection in every project.