Skip to content

Instantly share code, notes, and snippets.

View sebnash's full-sized avatar

Seb Nash sebnash

View GitHub Profile
@sebnash
sebnash / gist:3810976
Created October 1, 2012 11:05
One-liner: OS X serial number
system_profiler SPHardwareDataType | awk -F": " '/Serial/{print $2}'
@sebnash
sebnash / gist:3810982
Created October 1, 2012 11:07
One-liner: OS X current Wi-Fi network (≥10.6?)
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | awk '/ SSID/ {print substr($0, index($0, $2))}'
@sebnash
sebnash / gist:3811002
Created October 1, 2012 11:11
One-liner: OS X version number (e.g. 10.8.2)
sw_vers -productVersion
@sebnash
sebnash / gist:3811014
Created October 1, 2012 11:14
One-liner: Get an OS X application's version number (edit path)
defaults read "/Applications/TheApp.app/Contents/Info" CFBundleVersion
@sebnash
sebnash / gist:3811027
Created October 1, 2012 11:16
One-liner: OS X refresh DHCP
ipconfig set en0 DHCP
@sebnash
sebnash / gist:3811050
Created October 1, 2012 11:22
One-liner: OS X currently logged-on user
who | awk '/console/{print $1}'
@sebnash
sebnash / gist:3851742
Last active May 1, 2020 12:51
Disable Meraki System Manager client remote desktop, screenshots (OS X)
curl -L --create-dirs -o /etc/meraki/ci.conf http://dl.meraki.net/sm/ci.conf
@sebnash
sebnash / gist:3851773
Last active October 11, 2015 11:28
Re-enable Meraki System Manager client remote desktop, screenshots (OS X)
rm -f /etc/meraki/ci.conf
@sebnash
sebnash / gist:4538563
Created January 15, 2013 13:15
Stop Kerio Connect
/usr/local/kerio/mailserver/KerioMailServer stop
@sebnash
sebnash / gist:4538571
Created January 15, 2013 13:17
Start Kerio Connect
/usr/local/kerio/mailserver/KerioMailServer start