This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Parallel AJAX</title> | |
<style> | |
body { | |
font-family: Arial; |
This file contains 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
" iMproved! | |
set nocompatible | |
" Vundle initialization | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" Vundle | |
Plugin 'VundleVim/Vundle.vim' |
This file contains 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 tma() { | |
tmux attach -t $1 | |
} | |
function tml() { | |
tmux list-sessions | |
} | |
function tmn() { | |
tmux new -s $1 |
This file contains 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 rm-swap { | |
# Recursively remove vim swap files | |
find . -name "*.swp" -print0 | xargs -0 rm -rf | |
} |
This file contains 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 queryString (object) { | |
return Object.keys(object) | |
.reduce(function (collect, key, index, keys) { | |
collect.push(key + '=' + encodeURIComponent(object[key])) | |
return collect | |
}, []) | |
.join('&') | |
} | |
// Usage |
This file contains 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
import React from 'react'; | |
const EmailValidator = { | |
validate: (input) => { | |
return input.match && input.match(/\S+@\S+(\.\S{2,3})+/); | |
}, | |
createErrorMessage: () => { | |
return 'Input was not a valid email'; | |
} |
This file contains 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
require "json" | |
def boop(props : JSON::Type) | |
puts props | |
end | |
boop({ "test" => "test" }) # => {"test" => "test"} | |
# This has a compile error | |
# |
This file contains 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
defaults write com.googlecode.iterm2 DisableWindowSizeSnap -integer 1 |
This file contains 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
num = 50 | |
str1 = %(my num is #{num}) | |
str1 = %[my num is #{num}] | |
str1 = %{my num is #{num}} | |
str1 = %<my num is #{num}> | |
str1 = %|my num is #{num}| |
This file contains 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
import expect from "expect" | |
import lodash from "lodash" | |
function objectToNestedExpectations(input: any) { | |
const target = {} as any | |
for (const [key, value] of Object.entries(input)) { | |
if (lodash.isPlainObject(value)) { | |
target[key] = objectToNestedExpectations(value) | |
} else { |
OlderNewer