- Change default shell to Zsh
chsh -s $(which zsh)
- Clone Presto and install it according to
README.md
const isUnique = (array) => array.length === new Set(array).size; |
function crawlArray(array, index, n) { | |
return ((index + n) % array.length + array.length) % array.length; | |
} |
var date = new Date("10/11/2009"), | |
locale = "en-us", | |
month = date.toLocaleString(locale, { month: "long" }); |
// set-up a connection between the client and the server | |
var socket = io.connect(); | |
// let's assume that the client page, once rendered, knows what room it wants to join | |
var room = "abc123"; | |
socket.on('connect', function() { | |
// Connected, let's sign-up for to receive messages for this room | |
socket.emit('room', room); | |
}); |
/** | |
* Composes single-argument functions from right to left. The rightmost | |
* function can take multiple arguments as it provides the signature for | |
* the resulting composite function. | |
* | |
* @param {...Function} funcs The functions to compose. | |
* @returns {Function} A function obtained by composing the argument functions | |
* from right to left. For example, compose(f, g, h) is identical to doing | |
* (...args) => f(g(h(...args))). |
language: node_js | |
node_js: | |
- "6.9.5" | |
# addons: | |
# postgresql: "9.5" | |
before_script: | |
- "psql -c 'create database lmao_test;' -U postgres" | |
- "psql -U postgres -d lmao_test -a -f database/db_build.sql" | |
script: | |
- "npm run coverage" |
var portrange = 45032 | |
function getPort (cb) { | |
var port = portrange | |
portrange += 1 | |
var server = net.createServer() | |
server.listen(port, function (err) { | |
server.once('close', function () { | |
cb(port) |
function! s:check_back_space() | |
let col = col('.') - 1 | |
return !col || getline('.')[col - 1] =~ '\s' | |
endfunction | |
let g:ulti_expand_res = 0 "default value, just set once | |
function! Tab_Snippet_Complete() | |
let snippet = UltiSnips#ExpandSnippet() | |
if g:ulti_expand_res > 0 | |
return snippet |
#!/usr/bin/env bash | |
# vim: set filetype=ruby: | |
# b - browse Chrome bookmarks with fzf | |
[ $(uname) = Darwin ] || exit 1 | |
which fzf > /dev/null 2>&1 || brew reinstall --HEAD fzf || exit 1 | |
/usr/bin/ruby -x "$0" | | |
fzf-tmux -u 30% --ansi --multi --no-hscroll --tiebreak=begin | | |
awk 'BEGIN { FS = "\t" } { print $2 }' | |
chsh -s $(which zsh)
README.md