Skip to content

Instantly share code, notes, and snippets.

View dbyler's full-sized avatar
🚀
.

Dan Byler dbyler

🚀
.
View GitHub Profile
@dbyler
dbyler / Bless this specific App version.applescript
Last active December 17, 2015 01:28
Same as https://gist.github.com/dbyler/5308392, except it automatically chooses `versionedApplicationName` to bless (without prompting for the user's choice)
property applicationsFolder : "/Applications2"
property applicationName : "OmniFocus"
property versionedApplicationName : "OmniFocus 1" -- the version to restore
property promptBeforeLaunch : false
(*
This script lets you quickly select a version of an application as the primary one by renaming the "blessed" version to [Application name].app and other versions to [Application name]-[version].app.
What it does…
- Identifies which copy of an app matches the naming scheme of versionedApplicationName
@dbyler
dbyler / Bless this App.applescript
Last active December 15, 2015 18:59
This script lets you quickly select a version of an application as the primary one by renaming the "blessed" version to [Application name].app and other versions to [Application name]-[version].app.
property applicationsFolder : "/Applications"
property applicationName : "OmniFocus"
property promptBeforeLaunch : false
(*
This script lets you quickly select a version of an application as the primary one by renaming the "blessed" version to [Application name].app and other versions to [Application name]-[version].app.
What it does…
- Prompts you to select which version to 'bless'
- Quits app if running
@dbyler
dbyler / cattail
Last active December 12, 2015 12:38
Executes cat, then tail -f
cattail() {
if [ ! $1 ]; then
echo "usage: cattail 'string' file"
else
grep "$1" $2
tail -f -n 0 $2 |grep "$1"
fi
}
alias ct=cattail