Skip to content

Instantly share code, notes, and snippets.

View Brantron's full-sized avatar
🥕
Delivering Groceries

Brandon Lawrence Brantron

🥕
Delivering Groceries
View GitHub Profile
@Brantron
Brantron / index.html
Last active September 6, 2015 11:09
lazyload
<div class="row">
<div class="columns">
<p>Lazy Load Test</br>Titles and Dates</p>
<div id="cand"></div>
</div>
</div>
@Brantron
Brantron / Kill Rails for Mac
Last active August 29, 2018 17:31
Kill rails process on Mac from command line
Put this functionin your ~/.bash_profile
function krails() {
lsof -i tcp:3000 | awk -v N=2 '{print $N}' | tail -n -2 | xargs -L1 kill -9
}
then from the terminal reload with `source ~/.bash_profile` and you can run `krails` anytime in the terminal to kill all rails processes
@Brantron
Brantron / .zshrc
Created September 4, 2018 20:23
an interactive git branch selector for fzf
alias branchlist="git for-each-ref --sort='-authordate' --format='%1B[0;34m%(refname:short)%1B[m ===> %1B[1;35m%(subject)' refs/heads | sed -e 's-refs/heads/--'"
function branches() {
local branch_name=$(branchlist | fzf --ansi -m)
if [[ $branch_name ]]; then
echo $branch_name | awk '{print $1}' | xargs git co
fi
}
@Brantron
Brantron / index.html
Created June 2, 2021 20:28 — forked from milahu/index.html
get last item / key / value in map #jsbench #jsperf (https://jsbench.github.io/#7992a793df12b1ee16beaef7a9863c68) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>get last item / key / value in map #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>