Skip to content

Instantly share code, notes, and snippets.

View bryanheinz's full-sized avatar

bryan heinz bryanheinz

View GitHub Profile
@bryanheinz
bryanheinz / Copy Safari URLs
Last active August 29, 2015 14:06
Copy Safari URLs
tell application "Safari"
set urlList to {}
repeat with _tab in tabs of front window
set end of urlList to URL of _tab
end repeat
end tell
set urlString to urlList as string
set quoteURL to quoted form of urlString
do shell script "python <<EOF
var = " & quoteURL & "
@bryanheinz
bryanheinz / Crashplan
Created January 29, 2015 19:33
AppleScript to start/stop CrashPlan ProE Server
display dialog "Start or Stop Crashplan Server?" buttons {"Cancel", "Start", "Stop"} default button 1
copy the result as list to {buttonpressed}
if the buttonpressed is "Start" then
try
do shell script "launchctl load /Library/LaunchDaemons/com.crashplan.proserver.plist" with administrator privileges
end try
else if the buttonpressed is "Stop" then
try
do shell script "launchctl unload /Library/LaunchDaemons/com.crashplan.proserver.plist" with administrator privileges
end try
@bryanheinz
bryanheinz / xcode_builds++.sh
Created December 27, 2015 08:41
A quick script to add to your build phases in Xcode to automatically increase your build numbers.
#!/bin/bash
a=$(/usr/bin/defaults read "$PRODUCT_SETTINGS_PATH" CFBundleVersion)
b=$(/bin/expr $a + 1)
/usr/bin/defaults write "$PRODUCT_SETTINGS_PATH" CFBundleVersion $b
@bryanheinz
bryanheinz / xcode_builds++.sh
Last active February 4, 2017 07:09
A quick script to add to your build phases in Xcode to automatically increase your build numbers. Tested and working on OS X 10.12.3 and Xcode 8.2.1.
#!/bin/bash
a=$(/usr/bin/defaults read "$PRODUCT_SETTINGS_PATH" CFBundleVersion)
b=$(/bin/expr $a + 1)
/usr/bin/defaults write "$PRODUCT_SETTINGS_PATH" CFBundleVersion $b
c=$(/usr/bin/xcodebuild -project "$PROJECT_FILE_PATH" -target "$TARGETNAME" -showBuildSettings | /usr/bin/grep PRODUCT_SETTINGS_PATH)
d=${c%/*}
e=${d#* = *}
cd $e
@bryanheinz
bryanheinz / csb_status_reset.sh
Last active May 1, 2018 22:17
Resets Synology Cloud Station Backup client backup status.
#!/bin/bash
if [ $(sw_vers -productVersion | awk -F. '{print $2}') -lt "11" ]; then
echo "This script only works on macOS 10.11 or newer."
exit
fi
# get user
theUser=$(/usr/bin/stat -f "%Su" /dev/console)
@bryanheinz
bryanheinz / doNotUpdateSpotify.sh
Created June 14, 2018 18:39 — forked from AllanLRH/doNotUpdateSpotify.sh
Disable Spotify autoupdate on Mac OS X (testet on Yosemite).
# This script prevents Spotifys Autoupdating on OS X (testet on Yosemite)
# Based on this tutorial:
# http://supraliminal.net/blog/2013/4/21/how-to-revert-back-to-the-older-better-spotify-client
#
# This script must be run as root:
# sudo sh doNotUpdateSpotify.sh
#
FILE="/tmp/out.$$"
if [ "$(id -u)" != "0" ]; then

Keybase proof

I hereby claim:

  • I am bryanheinz on github.
  • I am bryanheinz (https://keybase.io/bryanheinz) on keybase.
  • I have a public key ASAyQNKuRBtINNYJ_acZe7pbsbNU59NNxMZD0-44gicaoAo

To claim this, I am signing this object:

#!/usr/bin/python
# https://docs.gitlab.com/ee/api/README.html
import requests
from sys import argv
from pprint import pprint
switches = argv
private_token = "" # gitlab private token
base_url = ""
"""
This script is used to check the status of character creation on specific worlds in Final Fantasy XIV.
To get a push notification you'll need to use Pushover (https://pushover.net) and include your user
and application keys.
You'll also want to update the world_name variable with the world you'd like to watch.
This script scrapes https://na.finalfantasyxiv.com/lodestone/worldstatus/ which is where you can find
the world names.
"""
import json
import requests
javascript:void(open('https://feedbin.me?subscribe='+location.href, 'FeedBin','toolbar=no,scrollbars=yes,width=750,height=700'));