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
# If you have a 'work' or 'business' Dropbox and a 'personal' one, | |
# this will only work on the 'personal' one | |
JSON="$HOME/.dropbox/info.json" | |
if [[ ! -e "$JSON" ]] | |
then | |
echo "$NAME: '$JSON' file not found." >>/dev/stderr | |
exit 2 |
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
#!/usr/bin/env zsh -f | |
# Purpose: rename PDFs by their creation date | |
# | |
# From: Timothy J. Luoma | |
# Mail: luomat at gmail dot com | |
# Date: 2019-12-26 | |
NAME="$0:t:r" | |
if [[ -e "$HOME/.path" ]] |
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
#!/usr/bin/env zsh -f | |
# Purpose: count PDF pages with a variety of tools | |
# | |
# From: Timothy J. Luoma | |
# Mail: luomat at gmail dot com | |
# Date: 2019-12-23 | |
NAME="$0:t:r" | |
if [[ -e "$HOME/.path" ]] |
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
#!/usr/bin/env zsh -f | |
# Purpose: use 'file' command to make sure image files have proper extension | |
# | |
# From: Timothy J. Luoma | |
# Mail: luomat at gmail dot com | |
# Date: 2019-10-04 | |
NAME="$0:t:r" | |
if [[ -e "$HOME/.path" ]] |
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 | |
# Purpose: Convert seconds (input) into a readable duration | |
# SOURCE: <https://raw.github.com/livibetter/td.sh/master/td.sh> | |
# DATE: 2013-01-03 | |
# Converting seconds to human readable time duration. | |
# Copyright (c) 2010, 2012 Yu-Jie Lin | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of |
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/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}') |
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
find /Applications -type d -user 0 -iname _MASReceipt -maxdepth 3 -print \ | |
| sed 's#/Contents/_MASReceipt##g' \ | |
| sort -f \ | |
| open -f |
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
<?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> |
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
<?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> |
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
<?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> |