Skip to content

Instantly share code, notes, and snippets.

View adamblank's full-sized avatar

Adam Blank adamblank

  • California, US
View GitHub Profile
@adamblank
adamblank / fake_progress_bar_width.js
Created November 24, 2015 16:48
This little utility changes the "width" (i.e. of a progress bar) with sense of unpredictability. The obj implementation is just to make it generic-ish (was originally a React component method.) The only logic that's been tested is marked below as "the meat"
const obj = {
width: 0,
start() {
let extra = 0;
let interval = setInterval(() => {
if (width === 100) {
clearInterval(interval);
}
// the meat
if (Math.floor(Math.random() + 0.6)) {
@adamblank
adamblank / git-config.sh
Last active May 7, 2021 21:25
Git Aliases
# A place for my git aliases
git config --global alias.lop 'log --pretty=oneline'
git config --global alias.pur 'pull --rebase'
git config --global alias.s 'status'
git config --global alias.c 'commit'
git config --global alias.cm 'commit -m'
git config --global alias.cam 'commit -a -m'
git config --global alias.fix 'commit --amend'
git config --global alias.fixup 'commit --fixup :/'