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
// Nanode_MAC | |
// Rufus Cable, June 2011 (threebytesfull) | |
// Sample code to read the MAC address from the 11AA02E48 on the | |
// back of the Nanode V5 board. | |
// This code is hacky and basic - it doesn't check for bus errors | |
// and will probably fail horribly if it's interrupted. It's best | |
// run in setup() - fetch the MAC address once and keep it. After | |
// the address is fetched, it puts the chip back in standby mode |
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
# You can find the volume UUID in Disk Utility. Select the volume on the left | |
# and then File->Get Info. See "Universal Unique Identifier". | |
# | |
# Options used below: | |
# ro for readonly (can be omitted) | |
# noauto to prevent auto-mount | |
# noatime to skip writing last access times (performance thing, optional) | |
# | |
# Remember to set the filesystem type (hfs, ntfs, etc) too | |
########## |
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
# add to .bash_profile or whatever | |
# convenience function to determine location - uses domain from resolv.conf instead | |
# of network location (which may not always be set correctly) | |
function currentloc { | |
local location | |
local domain=$(cat /etc/resolv.conf | awk '/^domain/ { print $2 }') | |
case $domain in | |
*.mycompany.com) | |
location=work |