Commits

José Antonio Pérez Sánchez committed d847c4d

git aliases; tool to remove old kernels

Comments (0)

Files changed (2)

 	email = jose.a.perez.sanchez@gmail.com
 [core]
 	editor = vim
+[alias]
+  st = status
+  co = checkout
+  ci = commit
+  br = branch
+  df = diff
+  lp = log -p
+  com = checkout master
+  fe = fetch origin
+  hr = reset origin/master --hard
+  me = config user.name
+  bn = !git for-each-ref --format='%(refname:short)' refs/heads/master
+  lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
+  today = !git all --since='12am' --committer=\"`git me`\"
+  today-all = !git all --since='12am'
+  sync = !git update && git co master && git pull && git co @{-1}
+  resync = !sh -c 'BRANCH_NAME=master && git com && git fe && git hr && git rebase master '

home/bin/remove-old-kernels

+#!/bin/sh
+dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge