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
// function Node(data, next = null) { | |
// this.data = data; | |
// this.next = next; | |
// } | |
function map(head, fn) { | |
if (!head) return null; // Just return bad nodes | |
const mappedHead = new Node(fn(head.data)); | |
let lastMappedNode = mappedHead; |
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
function chain(fns) { | |
let c = {}; | |
let toEx = []; | |
for (let fn in fns) { | |
this[fn] = fns[fn]; | |
c.[fn] = function () { | |
toEx.push({ [fn]: arguments }); | |
} | |
} |
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
# Plugins | |
run-shell ~/Dev/opensource/tmux-resurrect/resurrect.tmux | |
run-shell ~/Dev/opensource/tmux-continuum/continuum.tmux | |
set -g @resurrect-strategy-vim 'session' | |
set -g @continuum-restore 'on' | |
setw -g mode-keys vi | |
bind -n C-k send-keys -R \; clear-history |
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
// Async | |
function giveOrderToChef(giveFoodToCustomer){ | |
var food = makeFood(); | |
giveFoodToCustomer(food); | |
} | |
function callbackFunction(food) { | |
goToKitchen(food); | |
grabFood(food); | |
bringFoodToCustomer(food) |
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
class Business < ActiveRecord::Base | |
include SubuserExtender | |
# ... | |
end |
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
$('input.j-checkbox').each(function(){ | |
if ($(this).attr('checked')) { | |
$(this).next().trigger('click'); | |
} | |
}); | |
$('.j-selectbox').val('NO_RECEIVE'); |
NewerOlder