This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .bashrc | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
# User specific aliases and functions | |
set_prompt() { | |
local titlebar red yellow reset |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
usage () { | |
cat >&2 <<'__USAGE__' | |
usage: git gsr [-P | --perl-regexp] <old> <new> [paths...] | |
replace all occurrances of <old> with <new> optionally limited to | |
<paths...> (as interpreted by git grep) | |
-P, --perl-regexp interpret <old> as perl regular expression; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
""" | |
Convert Akira Kurosawa's top 100 films to a CSV for import to Letterboxd. | |
List extracted from https://www.openculture.com/2015/01/akira-kurosawas-list-of-his-100-favorite-movies.html | |
""" | |
LIST = """ | |
1. Broken Blossoms or The Yellow Man and the Girl (Griffith, 1919) USA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
find .git/objects -mtime -2h -type f | while read -r path | |
do | |
dir=${path#.git/objects/} | |
dir=${dir%/*} | |
name=${path##*/} | |
id=$dir$name | |
type=$(git cat-file -t "$id") | |
if test "$type" = blob | |
then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Replaced by gem-venv.sh. | |
Please see https://gist.github.com/jaysoffian/3c67711d3f00c364365905d877cc4af4 instead. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# gem-venv.sh | |
# ~~~~~~~~~~~ | |
# Summary: Like a Python venv, but for installing Ruby gems. | |
# | |
# Create a directory and gem wrapper script for installing gems self-contained | |
# to that directory. Control which `gem` is used via the `-G/--gem` switch, | |
# defaulting to whatever `gem` is found in PATH. | |
# | |
# Optionally takes a list of gems to install using the just created directory |
OlderNewer