Skip to content

Instantly share code, notes, and snippets.

TJ Luoma tjluoma

Block or report user

Report or block tjluoma

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tjluoma
tjluoma / proxystate.sh
Last active Jul 18, 2019
Assuming you have a Mac with both wired Ethernet and Wi-Fi, this will show you whether or not the http/https proxy is set for both
View proxystate.sh
#!/bin/zsh -f
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
## Note:
## ETHERNET_REGULAR / WIFI_REGULAR means http
## ETHERNET_SECURE / WIFI_SECURE means https
ETHERNET_REGULAR=$(networksetup -getwebproxy Ethernet | awk -F' ' '/^Enabled:/{print $2}')
@tjluoma
tjluoma / mas-list-apps.sh
Last active May 22, 2019
Generate an alphabetized list of all of the apps that are installed on your Mac which came from the Mac App Store, and open the list in a text file.
View mas-list-apps.sh
find /Applications -type d -user 0 -iname _MASReceipt -maxdepth 3 -print \
| sed 's#/Contents/_MASReceipt##g' \
| sort -f \
| open -f
@tjluoma
tjluoma / com.tjluoma.autolock-on-login.plist
Created Jan 9, 2019
A 'launchd' plist to automatically lock your Mac as soon as you log in.
View com.tjluoma.autolock-on-login.plist
<?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.autolock-on-login</string>
<key>ProgramArguments</key>
<array>
<string>/System/Library/CoreServices/Menu Extras/user.menu/Contents/Resources/CGSession</string>
<string>-suspend</string>
@tjluoma
tjluoma / com.tjluoma.lunadisplay.plist
Created Jan 6, 2019
This is a '.plist' file, intended to be used with `launchd` on Mac OS X. See http://luo.ma/LunaDisplay for more details
View com.tjluoma.lunadisplay.plist
<?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>
<true/>
<key>Label</key>
<string>com.tjluoma.keep-lunadisplay-running</string>
<key>ProgramArguments</key>
<array>
@tjluoma
tjluoma / Dropbox-Conflicts.savedSearch
Last active Jul 16, 2018
A ".savedSearch" file for Mac OS X for use with Spotlight, designed to find Dropbox's "conflicted copies". It should be saved to the ~/Library/Saved Searches/ folder and named something like "Dropbox-Conflicts.savedSearch". Be sure to change "YOUR-HOMEDIR-HERE" to your actual Home directory name.
View Dropbox-Conflicts.savedSearch
<?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>CompatibleVersion</key>
<integer>1</integer>
<key>RawQuery</key>
<string>(kMDItemDisplayName = "*s conflicted copy*"cd)</string>
<key>RawQueryDict</key>
<dict>
View com.tjluoma.autologin.plist
<?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.autologin</string>
<key>ProgramArguments</key>
<array>
<string>/System/Library/CoreServices/Menu Extras/User.menu/Contents/Resources/CGSession</string>
<string>-suspend</string>
@tjluoma
tjluoma / 3rd Party Mac Apps.txt
Last active Aug 4, 2016
I am trying to identify Mac apps which people use which are not (exclusively) in the Mac App Store. Please add suggestions in the comments. I came up with almost 100 but I am sure that I am missing some. Any help appreciated.
View 3rd Party Mac Apps.txt
1 1Password
2 Accordance
3 Alfred
4 Appfixer
5 Arqbackup
6 Audiobook Builder
7 Audio Hijack
8 Bartender
9 Battery Alert
10 BBedit
View fix-bartender.sh
#!/bin/zsh -f
# clean out bartender files to try to fix install issues.
#
# From: Timothy J. Luoma
# Mail: luomat at gmail dot com
# Date: 2016-04-13
NAME="$0:t:r"
PATH=/usr/local/scripts:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
@tjluoma
tjluoma / bt4check.sh
Last active Apr 15, 2016
# Check to see if "low power" Bluetooth is supported on a given Mac
View bt4check.sh
#!/bin/zsh -f
# Check to see if "low power" Bluetooth is supported on a given Mac
#
# From: Timothy J. Luoma
# Mail: luomat at gmail dot com
# Date: 2016-04-13
NAME="bt4check.sh"
PATH=/usr/local/scripts:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
@tjluoma
tjluoma / get-bbc-i-am-legend.sh
Created Mar 30, 2016
If you act before April 14th, 2016, you should be able to download all 9 parts of the BBC's “I Am Legend”. Part 1 is here: http://www.bbc.co.uk/programmes/b007k0s3 and the subsequent parts are linked thereafter.
View get-bbc-i-am-legend.sh
#!/bin/zsh -f
# Purpose: Download the BBC production of “I Am Legend”
#
# From: Timothy J. Luoma
# Mail: luomat at gmail dot com
# Date: 2016-03-24
# Gist: https://gist.github.com/tjluoma/b432bca708e7ab5984a2da7532029de0
## You can change this to whatever you want
## The directory will be created if it does not exist
You can’t perform that action at this time.