$ node index.js
<p data-reactid=".1n79yas6h34" data-react-checksum="-427214699"><span data-reactid=".1n79yas6h34.0">Hello </span><span data-reactid=".1n79yas6h34.1">Jordan</span><span data-reactid=".1n79yas6h34.2">!</span></p>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const K = x => ls => [x].concat(ls) | |
const add = ([fst, snd, ...rest]) => [fst + snd].concat(rest) | |
const mult = ([fst, snd, ...rest]) => [fst * snd].concat(rest) | |
const dup = ([fst, ...rest]) => [fst].concat([fst, ...rest]) | |
const swp = ([fst, snd, ...rest]) => [snd, fst, ...rest] | |
const print = ([fst, ...rest]) => { | |
console.log(fst) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
; Coin Flips! | |
; http://fivethirtyeight.com/features/can-you-survive-this-deadly-board-game/ | |
; | |
; You place 100 coins heads up in a row and number them by position, with the coin all the way on the left No. 1 and the one on the rightmost edge No. 100. Next, for every number N, from 1 to 100, you flip over every coin whose position is a multiple of N. For example, first you’ll flip over all the coins, because every number is a multiple of 1. Then you’ll flip over all the even-numbered coins, because they’re multiples of 2. Then you’ll flip coins No. over all the coins, because every number is a multiple of 1. Then you’ll flip over all the even-numbered coins, because they’re multiples of 2. Then you’ll flip coins No. 3, 6, 9, 12 ... And so on. | |
; | |
; What do the coins look like when you’re done? Specifically, which coins are heads down? | |
; Heads is true, tails is false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# redux.rb | |
# | |
# An implementation of Redux.createStore (github.com/rackt/redux) in Ruby | |
# Jordan Scales - http://thatjdanisso.cool | |
def assert(expr, message) | |
raise message unless expr | |
end | |
# Counter reducer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* $ node test.js | |
* 1 | |
* 3 | |
*/ | |
var window; | |
window = { | |
blah: 1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let assert = require("assert"); | |
let mockDom = require("./mock-dom"); | |
describe("Landmarks plugin", function() { | |
let dom = null; | |
let plugin = null; | |
before(function(done) { | |
mockDom.createDom(function(domObj) { | |
// Assign `dom` to the new created jsdom |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const VISUAL_INDICATOR_TESTS = [ | |
function outline(style, focusStyle) { | |
// Fail if there are no differences in the element's outline | |
if (style.outline !== focusStyle.outline) { | |
return false; | |
} | |
// A focus outline that is not "none" is only valid if the outline | |
// also has a width | |
return focusStyle.outlineStyle !== "none" && |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -g prefix C-a | |
unbind C-b | |
set-option -g default-shell /bin/zsh | |
set -sg escape-time 1 | |
set -g base-index 1 | |
set -g pane-base-index 1 | |
bind r source-file ~/.tmux.conf \; display "Reloaded .tmux.conf!" |