Skip to content

Instantly share code, notes, and snippets.

@krisselden
krisselden / README.md
Last active July 5, 2016 09:07
# Plot and Test Samples in R
var assert = require('assert');
global.KEYS = JSON.parse(require('fs').readFileSync('bindings.json','utf8'));
global.RESULT = false;
global.CHARAT = function (key) {
var l = key.length;
return l > 7 &&
key.charAt(l - 7) === 'B' &&
key.charAt(l - 6) === 'i' &&
key.charAt(l - 5) === 'n' &&
@rwjblue
rwjblue / ember-master-in-ember-cli-app.md
Last active October 10, 2016 23:01
Developing on Ember master (linked locally), with an Ember CLI application.

From a terminal run the following commands:

git clone git@github.com:emberjs/ember.js
cd ember.js
npm install
npm start

While that is running open another terminal and run the following (starting from the ember.js folder you cloned a moment ago):

@lukemelia
lukemelia / note.txt
Created April 8, 2015 04:34
When Error: watch EMFILE strikes (OS X)
This requires `brew install jq` which is a command json query.
I got this from @krisselden
function createQueue() {
let queue = [];
let i = 0;
let len = 0;
return [
(fn) => (queue[len++] = fn),
() => {
try {
for (; i < len; i++) {
const fn = queue[i];
@scotu
scotu / solarized.css
Created October 8, 2011 18:27 — forked from tdreyno/solarized.css
Solarized Light Pygments CSS
.highlight { background-color: #ffffcc }
.highlight .c { color: #586E75 } /* Comment */
.highlight .err { color: #93A1A1 } /* Error */
.highlight .g { color: #93A1A1 } /* Generic */
.highlight .k { color: #859900 } /* Keyword */
.highlight .l { color: #93A1A1 } /* Literal */
.highlight .n { color: #93A1A1 } /* Name */
.highlight .o { color: #859900 } /* Operator */
.highlight .x { color: #CB4B16 } /* Other */
.highlight .p { color: #93A1A1 } /* Punctuation */
@jancel
jancel / gist:1367606
Created November 15, 2011 17:01 — forked from r00k/gist:906356
Custom devise strategy
# In config/initializers/local_override.rb:
require 'devise/strategies/authenticatable'
module Devise
module Strategies
class LocalOverride < Authenticatable
def valid?
true
end
import Ember from 'ember';
import { module } from 'qunit';
import startApp from 'livin/tests/helpers/start-app';
import OnboardPage from 'livin/tests/helpers/page-objects/onboard';
import { test } from 'qunit';
const { run } = Ember;
let application;
module('Acceptance | onboard', {
@subelsky
subelsky / casperjs_example.js
Created August 8, 2012 18:51
Webscraping with CasperJS, PhantomJS, jQuery, and XPath
var system = require('system');
if (system.args.length < 5) {
console.info("You need to pass in account name, username, password, and path to casperJS as arguments to this code.");
phantom.exit();
}
var account = system.args[1];
var username = system.args[2];
var password = system.args[3];
@peterc
peterc / dnsd.rb
Created December 2, 2011 23:47
Simple, scrappy UDP DNS server in Ruby (with protocol annotations)
# Simple, scrappy UDP DNS server in Ruby (with protocol annotations)
# By Peter Cooper
#
# MIT license
#
# * Not advised to use in your production environment! ;-)
# * Requires Ruby 1.9
# * Supports A and CNAME records
# * See http://www.ietf.org/rfc/rfc1035.txt for protocol guidance
# * All records get the same TTL