viz. https://arxiv.org/pdf/1608.06001.pdf for a definition and discussion. The authors of the linked article were kind enough to provide me with the sequences.
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
# Usage: ruby commit-prepender this is my commit message without quotation marks | |
branch_name = %x.git rev-parse --abbrev-ref HEAD. | |
regex = Regexp.new(/[A-Z]*-[0-9]*/) | |
string_to_prepend = branch_name.match(regex).to_s | |
cmd = "git commit -m \"[#{string_to_prepend}] #{ARGV.join(" ")}\"" | |
`#{cmd} >&2` |
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
# Create a global gitignore for macOS | |
cat https://raw.githubusercontent.com/github/gitignore/master/Global/macOS.gitignore >> ~/.gitignore_global | |
git config --global core.excludesfile ~/.gitignore_global | |
# Send screenshots to a directory that isn't the desktop | |
mkdir -p ~/Screenshots | |
defaults write com.apple.screencapture location ~/Screenshots | |
# Show all hidden files (like dotfiles) | |
defaults write com.apple.finder AppleShowAllFiles YES; killall Finder; |
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
def transform_hash(original, options={}, &block) | |
original.inject({}){|result, (key,value)| | |
value = if (options[:deep] && Hash === value) | |
transform_hash(value, options, &block) | |
else | |
value | |
end | |
block.call(result,key,value) | |
result | |
} |