Skip to content

Instantly share code, notes, and snippets.

View keif's full-sized avatar

Keith Baker keif

View GitHub Profile
Verifying that +keithbaker is my blockchain ID. https://onename.com/keithbaker
weather() {
# ?u/m for changing metrics
curl "http://wttr.in/${1-}";
echo "weather [CITY/ZIP]";
}
moon() {
curl "http://wttr.in/moon${1-}";
echo "moon [@dateYYYY-MMM-DD]"
}
#!/bin/sh
# Apps
apps=(
# System Plugins
# flash
java
# silverlight
# alfred
#!/bin/sh
echo "Good day!"
brew update
brew doctor
brew prune
brew cleanup
#!/bin/sh
# fonts
fonts=(
font-m-plus
font-clear-sans
font-roboto
)
# install fonts
#!/bin/bash
# Check for Homebrew,
# Install if we don't have it
if test ! $(which brew); then
echo "Installing homebrew..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Update homebrew recipes
#!/bin/sh
binaries=(
ack
# Install Bash 4
bash
bash-completion
# Install GNU core utilities (those that come with OS X are outdated)
coreutils
ffmpeg
#!/bin/sh
# Apps
apps=(
# System Plugins
# flash
java
# silverlight
# alfred
@keif
keif / breadth-first-search.js
Created April 29, 2016 04:46
JavaScript based Breadth-First Search
/* A Queue object for queue-like functionality over JavaScript arrays. */
var Queue = function() {
this.items = [];
};
Queue.prototype.enqueue = function(obj) {
console.log("enqueue: ", obj);
this.items.push(obj);
};
Queue.prototype.dequeue = function() {
return this.items.shift();
@keif
keif / prepare-commit-msg
Created January 30, 2018 21:05
This will automatically prepend your branch name to your commit.
#!/bin/bash
# Include any branches for which you wish to disable this script
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
# Get the current branch name and check if it is excluded
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"