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 | |
# Removes kernels + headers remaining on a ubuntu machine. | |
current_version=$(uname -a |awk '{print substr($3, 1, length($3)-length("-generic"));}') | |
echo "Current Kernel: $current_version" | |
installed=$(dpkg-query -l | grep '^ii' | awk '{print $2}') | |
headers=$(grep linux-headers- <<<"$installed" |head -n -3 |grep -v "$current_version") | |
modules=$(grep linux-modules <<<"$installed" |grep -v "extra" |head -n -2 |grep -v "$current_version") |
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
enum SomeEnum { | |
case .ExampleValue | |
case .CountedCase( someCount : Int ) | |
} | |
func doSomething( state : SomeEnum ){ | |
switch state { | |
case ExampleValue: | |
print("Example") | |
case CountedCase( 0 ): |
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
This Gist is really part of an article Mark Eschbach wrote at http://meschbach.com/kb/simple-ruby-stomp-client.html. |