Skip to content

Instantly share code, notes, and snippets.

nvm() {
[[ -z "$NVM_DIR" ]] && export NVM_DIR="$HOME/.nvm"
[[ -f "$NVM_DIR/nvm.sh" ]] && source "$NVM_DIR/nvm.sh"
nvm "$@"
}

Keybase proof

I hereby claim:

  • I am tlunter on github.
  • I am tlunter (https://keybase.io/tlunter) on keybase.
  • I have a public key whose fingerprint is C5D0 2775 B22E 8ECA 78CF 32A8 8B73 2B0D 4CF5 C6B5

To claim this, I am signing this object:

@tlunter
tlunter / test.sh
Created November 2, 2014 19:32
The output of $test changes whether or not the bash grouping is piped into another command or not.
#!/bin/bash
set -e -o pipefail
test=1
{ echo "test"; echo "test2" && test=0; } | cat > /dev/null
echo "$test"
test=1
{ echo "test"; echo "test2" && test=0; } > /dev/null
echo "$test"
### Keybase proof
I hereby claim:
* I am tlunter on github.
* I am tlunter (https://keybase.io/tlunter) on keybase.
* I have a public key whose fingerprint is F60B CF59 B8DD C325 7424 313B DD21 BDF9 D17E 8CC4
To claim this, I am signing this object:
@tlunter
tlunter / gist:5717172
Created June 5, 2013 20:45
Double compare?
data TTT a = Empty | Two (TTT a) a (TTT a) | Three (TTT a) a (TTT a) a (TTT a)
type Set a = TTT a
empty :: Set a
empty = Empty
member :: Ord a => a -> Set a -> Bool
member x Empty = False
member x (Two l v r) =