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
get_latest_release() { | |
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api | |
grep '"tag_name":' | # Get tag line | |
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value | |
} | |
# Usage | |
# $ get_latest_release "creationix/nvm" | |
# v0.31.4 |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Micro Stripe Checkout</title> | |
<meta charSet='utf-8' /> | |
<meta name='viewport' content='initial-scale=1.0, width=device-width' /> | |
<script src="https://js.stripe.com/v3/"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> | |
<style> | |
* { |
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
Rx.Observable.timer(0, 10 * 1000) | |
.switchMap(_ => fetch('https://blockchain.info/ticker?cors=true') | |
.then(res => res.json()) | |
.then(parsed => parsed.EUR.buy) | |
) | |
.distinctUntilChanged() | |
.scan((acc, curr) => ({ | |
delta: Math.round((acc.value - curr || 0) * 100) / 100, | |
value: curr | |
}), {}) |
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
zstyle ':completion:*:*:git:*' script ~/.zsh/git-completion.bash | |
fpath=(~/.zsh $fpath) | |
alias ..='cd ..' | |
alias ...='cd ../..' | |
alias ls='ls -GwF' | |
alias ll='ls -alh' | |
alias zshrc='code ~/.zshrc' |
OlderNewer