Skip to content

Instantly share code, notes, and snippets.

(defn english [n] (clojure.pprint/cl-format nil "~r" n))
(dotimes [n 99] (let [w (english n)] (if (= 0 (compare w (apply str (sort w)))) (println w))))
#!/bin/sh
#
# Adam Sharp
# Aug 21, 2013
#
# Usage: Add it to your PATH and `git remove-submodule path/to/submodule`.
#
# Does the inverse of `git submodule add`:
# 1) `deinit` the submodule
# 2) Remove the submodule from the index and working directory
#!/usr/bin/env bash
THIS_BASENAME=$(basename "$0")
TMUX_SESSION_NAME=$THIS_BASENAME
HOSTS=""
USER=""
CERTIFICATE=""
FILENAME=""
SSH_ARGS=""
@TBonnin
TBonnin / git-remove-branches
Last active May 27, 2023 14:44
Safely remove local fully merged branches
#!/bin/bash
# This has to be run from master
git checkout master
# Update our list of remotes
git fetch
git remote prune origin
# Remove local fully merged branches
@TBonnin
TBonnin / unused_images.sh
Created October 2, 2012 18:54
Unused images
#!/bin/bash
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
for i in `find . -name "*.png" -o -name "*.jpg"`; do
file=`basename -s .jpg "$i" | xargs basename -s .png | xargs basename -s @2x`
result=`ack -i "$file"`
if [ -z "$result" ]; then
echo "$i"
fi
@TBonnin
TBonnin / gist:2828203
Created May 29, 2012 12:46 — forked from mdales/gist:2622886
Updating Xcode project version number from git
# Use git describe as build number
echo "Updating version/build number from git..."
plist=${PROJECT_DIR}/${INFOPLIST_FILE}
# Get build/version number
versionnum=`git describe --tags | awk '{split($0,a,"-"); print a[1]}'`
buildnum=`git describe --tags`
if [[ "${versionnum}" == "" ]]; then