Audio notification of success or failure after a command finishes. Useful for long-running commands.
ding rake db:migrate
#!/bin/sh | |
# Example usage: | |
# lctl stop mysql | |
# lctl start solr | |
# lctl restart rabbitmq | |
# lctl rabbitmq <- no action argument is equivalent to a restart argument | |
set -ex |
#!/bin/sh | |
# Attempt to delete every branch except master and the currently checked out | |
# branch. If the branch isn't merged, it won't delete, and it will be noted on | |
# STDERR. | |
git branch | grep -v '\bmaster\b\|^\*' | while read branch; do | |
git branch -d $branch | |
done |
#!/bin/sh | |
readonly empty_dir=$(mktemp -d) | |
readonly target="$1" | |
rm -rf "$empty_dir" | |
mkdir "$empty_dir" | |
rsync --recursive --delete "$empty_dir"/ "$target"/ | |
rmdir "$empty_dir" "$target" |
As configured in my dotfiles.
start new:
tmux
start new with session name:
You can click and drag then release to fling them, or press F for a fireworks show. Pressing any key will detonate all currently visible fireworks. There's a commented bit that activates the game when the Konami code is entered on the keyboard.
A Pen by Justin Force on CodePen.
require 'benchmark/ips' | |
STRINGS = %w[ | |
There's no beginning to this story. A bookshelf sinks into the sand. And a | |
language learned, a forgotten term, is studied once again. It's a shocking | |
bit of footage viewed from a shitty TV screen. Just squint at it, just snowy | |
static to make out the meaning. And keep on stretching the antenna hoping that | |
it will come clear. We need some reception, a higher message. Just tell us | |
what to fear 'cause I don't know what tomorrow brings. It's alive with such | |
possibility. All I know is I feel better when I sing. |
#!/usr/bin/env ruby | |
# x starts at 0 because we increment x BEFORE checking the character. | |
# y starts at 1 because we only increment it when we hit a newline. | |
x, y = 0, 1 | |
puts 'Positions are 1-indexed, NOT 0-indexed.' | |
puts 'i.e. The first character in the file is at position 1:1' | |
puts |
// ==UserScript== | |
// @name Hide Hangouts in Inbox | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author Justin Force | |
// @match https://inbox.google.com/* | |
// @grant none | |
// ==/UserScript== |
/* https://gist.github.com/justinforce/4b15ff14b225f5b4d500be4ee49a8757 */ | |
#iptStart .topRow { | |
padding-bottom: 0 !important; | |
} | |
#iptStart .banner { | |
background-image: none !important; | |
height: 57px !important; | |
} |