Skip to content

Instantly share code, notes, and snippets.

View Lacrymology's full-sized avatar

Tomas Neme Lacrymology

  • ShipHero LLC
  • Barcelona
View GitHub Profile

Keybase proof

I hereby claim:

  • I am lacrymology on github.
  • I am lacrymology (https://keybase.io/lacrymology) on keybase.
  • I have a public key ASDNFHbML-gGE2QF6TlNRr4d2qx54xkHMrVEXO2JchfM7Ao

To claim this, I am signing this object:

@Lacrymology
Lacrymology / create-alias.sh
Last active August 22, 2018 17:27
Git alias to list files by size
git config --global alias.list-sizes-2 '!f() { git rev-list --objects --all | git cat-file --batch-check="%(objecttype) %(objectname) %(objectsize) %(rest)" | sed -n "s/^blob //p" | sort --numeric-sort --key=2 | cut -c 1-12,41- | numfmt --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest ; } ; f'
## Here's the command divided, to make it more clear
# git rev-list --objects --all
# | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)'
# | sed -n 's/^blob //p'
# | sort --numeric-sort --key=2
# | cut -c 1-12,41-
# | numfmt --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest
@Lacrymology
Lacrymology / setup-config.sh
Last active August 21, 2018 11:34
Setup my config
git clone --bare git@bitbucket.org:Lacrymology/dotfiles.git $HOME/.cfg.git
function config {
/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@
}
mkdir -p .config-backup
config checkout
if [ $? = 0 ]; then
echo "Checked out config.";
@Lacrymology
Lacrymology / commit-msg
Created May 17, 2016 13:01 — forked from henrik/commit-msg
Git commit-msg hook that automatically adds "Refs #123" when in the branch t123, "[#123]" when in the branch s123 etc.
#!/usr/bin/env ruby
#
# Git commit-msg hook. If your branch name is in the form "t123", automatically
# adds "Refs #123." to commit messages unless they mention "#123" already.
# Include "#close" or "#finish" to add "Closes #123."
#
# For Pivotal Tracker, branch names like "s123" adds "[#123]".
# Include "#close" or "#finish" to add "[Finishes #123]".
#
# If you include "#noref" in the commit message, nothing will be added to
@Lacrymology
Lacrymology / commit-msg
Last active May 17, 2016 12:53
git hook to prefix commit messages with ticket number
#!/usr/bin/env ruby
#
# Git commit-msg hook. If your branch name is in the form "#{prefix}-123", automatically
# adds "#{prefix}-123:" to commit messages unless they mention "#{orefix}-123" already.
# Include "#noref" in the message to avoid this behavior for the current commit.
# The "#noref" will be stripped from the commit message.
#
# Modified from script Henrik Nyh <http://henrik.nyh.se> 2009-09-10 under the MIT License.
#
#