I hereby claim:
- I am bradjasper on github.
- I am bradjasper (https://keybase.io/bradjasper) on keybase.
- I have a public key ASC6HgChDmmMjR1--b3QX6n2L3i85MshbOXBX1kDiq69oQo
To claim this, I am signing this object:
#!/usr/bin/env python | |
import SimpleHTTPServer | |
import SocketServer | |
PORT = 8919 | |
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler | |
httpd = SocketServer.TCPServer(("", PORT), Handler) |
I hereby claim:
To claim this, I am signing this object:
2016-04-22T23:00:52.225Z 0f521c85-08de-11e6-acfd-2177bd93f70f Got createRecurringJob event | |
{ | |
"input": { | |
"jobType": "urls", | |
"urls": [ | |
"http://google.com" | |
] | |
}, | |
"schedule": "rate(5 minutes)" | |
} |
#!/bin/bash | |
BASE_DIR=$HOME/Projects/focus | |
BUILD_DIR=$BASE_DIR/Builds | |
FOCUS_ARCHIVE=$BUILD_DIR/Focus.xcarchive | |
FOCUS_APP=$BUILD_DIR/Focus.app | |
echo "Building Focus..." | |
echo "Cleaning up old archive & app..." |
Here's how to copy & restore Focus preferences | |
1) (On old computer) Copy preferences file to desktop. This BradJasper.Focus.plist file saves all of your settings. You can back this up in Dropbox if you want. | |
cp ~/Library/Preferences/BradJasper.Focus.plist ~/Desktop/ | |
2) (On new computer) Kill focus & preferences monitor | |
killall Focus; killall cfprefsd; |
ACTIVE_NETWORK=$(echo "open|||get Setup:/Network/Service/$(echo "open|||get State:/Network/Global/IPv4|||d.show" | tr '|||' '\n' | scutil | grep "PrimaryService" | awk '{print $3}') |||d.show" | tr '|||' '\n' | scutil | grep "UserDefinedName" | awk -F': ' '{print $2}') | |
FOCUS_BLACKHOLE_PID=$(ps aux | grep FocusBlackholeProxy | grep -v grep | awk '{print $2}') | |
PROXY_URL_OUTPUT=$(networksetup -getautoproxyurl "$ACTIVE_NETWORK") | |
if [[ $PROXY_URL_OUTPUT == *"focus"* ]] | |
then | |
echo "Focus is active!" | |
else | |
echo "Focus is not active" |
#!/bin/bash | |
ACTIVE_NETWORK=$(echo "open|||get Setup:/Network/Service/$(echo "open|||get State:/Network/Global/IPv4|||d.show" | tr '|||' '\n' | scutil | grep "PrimaryService" | awk '{print $3}') |||d.show" | tr '|||' '\n' | scutil | grep "UserDefinedName" | awk -F': ' '{print $2}') | |
echo "Active network is '$ACTIVE_NETWORK'" | |
echo "Turning off active network PAC" | |
sudo networksetup -setautoproxystate "$ACTIVE_NETWORK" off | |
echo "Removing NSUserDefaults" |
Copyright (c) 2013 Jamz Tang <[email protected]> | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is furnished | |
to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all |
#!/usr/bin/ruby | |
# encoding: utf-8 | |
# | |
# Grab iTunes Icon - Brett Terpstra 2014 <http://brettterpstra.com> | |
# | |
# Retrieve an iOS app icon at the highest available resolution | |
# All arguments are combined to create an iTunes search | |
# The icon for the first result, if found, is written to a filename based on search terms | |
# | |
# example: |
# ANSI color codes | |
RESET="\[\033[0m\]" # reset | |
HICOLOR="\[\033[1m\]" # hicolor | |
UNDERLINE="\[\033[4m\]" # underline | |
INVERSE="\[\033[7m\]" # inverse background and foreground | |
FBLACK="\[\033[30m\]" # foreground black | |
FRED="\[\033[31m\]" # foreground red | |
FGREEN="\[\033[32m\]" # foreground green | |
FYELLOW="\[\033[33m\]" # foreground yellow | |
FBLUE="\[\033[34m\]" # foreground blue |