This file contains 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 -x | |
# remerge <onto> [<merge_commit>] | |
# e.g.: remerge origin/trunk | |
# merge_commit defaults to HEAD | |
onto=$1 | |
mc=${2:-HEAD} | |
mc_sha=$(git rev-parse $mc) # original merge commit | |
p1_sha=$(git rev-parse $onto) # what we want its new first parent to be |
This file contains 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
netfn () { | |
echo "$1" | | |
awk 'function nto32b(n){ # converts an integer to a 32-bit ascii bitstring | |
b="" | |
while (n>1) { | |
if (n%2) {b="1"b} else {b="0"b} | |
n=int(n/2) | |
} | |
b="1"b | |
return sprintf("%032s",b) |
This file contains 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 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 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 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