This file contains hidden or 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/zsh -f | |
| # Purpose: Show the number of mounted devices (not including boot drive) | |
| # Intended to be used with TextBar - http://www.richsomerfield.com/apps/ | |
| COUNT=`/sbin/mount | /usr/bin/egrep -v '^(devfs|map) ' | /usr/bin/wc -l | /usr/bin/tr -dc '[0-9]'` | |
| # We don't want to count the boot drive, so subtract 1 | |
| COUNT=$(($COUNT - 1)) | |
| if [ "$COUNT" = "0" ] |
This file contains hidden or 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/zsh -f | |
| # Purpose: This will show a MacBook’s current battery charge | |
| # Intended to be used with TextBar - http://www.richsomerfield.com/apps/ | |
| /usr/sbin/ioreg -n AppleSmartBattery -r |\ | |
| awk '$1~/Capacity/{c[$1]=$3} END{OFMT="%.2f%%"; max=c["\"MaxCapacity\""]; print (max>0? 100*c["\"CurrentCapacity\""]/max: "?")}' | |
| # |
This file contains hidden or 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/zsh -f | |
| # Purpose: Show the SSID (name of currently connected Wi-Fi network) | |
| # Intended to be used with TextBar - http://www.richsomerfield.com/apps/ | |
| if [ ! -x '/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport' ] | |
| then | |
| echo "airport command not found" | |
| exit 0 | |
| fi |
This file contains hidden or 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/zsh -f | |
| ### Change this to be your iMessage email account | |
| MY_IMESSAGE='[email protected]' | |
| ### You should not need to change anything else | |
| ### I suggest saving this to /usr/local/bin/imsg.sh | |
| ### then `chmod 755 /usr/local/bin/imsg.sh` | |
| ################################################################################################### | |
| # This is the name of the script without the path or the extension, so 'imsg' if you |
This file contains hidden or 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 | |
| # Encode a WAV to a finalized podcast MP3 with metadata, in the current directory | |
| # Requires lame | |
| # With Homebrew on Mac OS X: brew install lame | |
| # Usage: | |
| # Call the script with three arguments: | |
| # -t or --title followed by the title of the episode in quotes | |
| # -s or --summary followed by the iTunes Summary for the episode, in quotes |
This file contains hidden or 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/zsh -f | |
| # Important! DIR _must_ be the same as whatever directory you used | |
| # for `QueueDirectories` in the `com.tjluoma.ignitiononoroffatwork.plist` | |
| DIR="/Users/jsmyth/Dropbox/IFTTT/Automatic/IgnitionOnOrOffAtWork/" | |
| # if the directory does not exist, exit | |
| cd "$DIR" || exit 0 | |
| # get rid of this file, which will cause `launchd` to keep triggering |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Label</key> | |
| <string>com.tjluoma.IgnitionAtWork</string> | |
| <key>Program</key> | |
| <string>/usr/local/bin/IgnitionAtWork.sh</string> | |
| <key>QueueDirectories</key> | |
| <array> |
This file contains hidden or 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/zsh | |
| # Purpose: Download and install Mac OS X’s combo updater | |
| # | |
| # From: Tj Luo.ma | |
| # Mail: luomat at gmail dot com | |
| # Web: http://RhymesWithDiploma.com | |
| # Date: 2014-05-15 | |
| # This is the only thing you _have_ to change | |
| URL='http://support.apple.com/downloads/DL1786/en_US/OSXUpdCombo10.10.2.dmg' |
This file contains hidden or 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/zsh | |
| # | |
| # Author: Timothy J. Luoma | |
| # Email: luomat at gmail dot com | |
| # Date: 2014-05-08 | |
| # | |
| # Purpose: enable / disable ftpd on OS X Lion (or later) | |
| # | |
| # URL: https://github.com/tjluoma/ftpd/ | |
| # |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>KeepAlive</key> | |
| <dict> | |
| <key>Crashed</key> | |
| <true/> | |
| <key>SuccessfulExit</key> | |
| <false/> |