Skip to content

Instantly share code, notes, and snippets.

View gorango's full-sized avatar
👋
🌍

Goran gorango

👋
🌍
  • undefined
View GitHub Profile
@gorango
gorango / Contract Killer 3.md
Last active August 29, 2015 14:28
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

#!/bin/bash
# Ubuntu kernel cleanup:
# Save the 2 latest kernels and remove the old
IMAGES=($(dpkg --get-selections | grep "linux-image-[[:digit:]].*" | tr "\t" ";" | cut -d ";" -f1))
HEADERS=($(dpkg --get-selections | grep "linux-headers-[[:digit:]].*" | tr "\t" ";" | cut -d ";" -f1))
I_LEN=${#IMAGES[@]}
H_LEN=${#HEADERS[@]}