Skip to content

Instantly share code, notes, and snippets.

View jonchurch's full-sized avatar
♥️

Jon Church jonchurch

♥️
View GitHub Profile
@lukechilds
lukechilds / get_latest_release.sh
Created August 9, 2016 19:43
Shell - Get latest release from GitHub
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
@ColeTownsend
ColeTownsend / index.html
Last active November 27, 2018 20:30
The Micro Stripe demo front end.
<!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>
* {
@crunchie84
crunchie84 / rx-bitcoin-price-ticker.js
Last active September 29, 2020 05:21
RxJs bitcoin stock ticker example
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
}), {})
@ulisesantana
ulisesantana / .zshrc
Last active November 17, 2019 16:09
Passing to macOS Catalina and installing zsh. Based on this https://dev.to/saltyshiomix/a-guide-for-upgrading-macos-to-catalina-and-migrating-the-default-shell-from-bash-to-zsh-4ep3 by Shiono Yoshihide
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'