Skip to content

Instantly share code, notes, and snippets.

View bradfeehan's full-sized avatar

Brad Feehan bradfeehan

View GitHub Profile

Keybase proof

I hereby claim:

  • I am bradfeehan on github.
  • I am bradfeehan (https://keybase.io/bradfeehan) on keybase.
  • I have a public key whose fingerprint is 79B8 5B97 E16E 573A 440A BC63 5C73 731D D8AB 9D6C

To claim this, I am signing this object:

foo * * baz

@bradfeehan
bradfeehan / auto-detect-ssh-agent.sh
Created December 24, 2014 07:31
Auto-detect the current user's SSH agent
#!/bin/bash
#
# Sets environment to automatically find the current user's SSH agent
# Echoes to stdout the PID of the process with a particular command line
function pid_of_command {
local command="$1"
ps -u "$(whoami)" \
#!/bin/bash
#
# A command-line utility to enable/disable Getflix
#
# Usage: getflix on
# getflix off
ARGC=$#
@bradfeehan
bradfeehan / resize-dock-external-monitor.sh
Last active September 12, 2022 06:17
Programmatically resize Mac OS X Dock based on presence of external monitor
#!/bin/bash
#
# Resizes the Mac OS X Dock based on whether or not an external monitor
# is connected.
#
# This script will need to be ran whenever the display configuration
# changes (that is, whenever a display is connected or disconnected).
# I use Stay[1] to do this.
#
# [1]: http://cordlessdog.com/stay/
@bradfeehan
bradfeehan / Output
Created March 30, 2013 10:31
Test for Guzzle PUT request with post fields
Read 171 bytes from socket.
Full response:
BEGIN
###
PUT / HTTP/1.1
Transfer-Encoding: chunked
Host: 127.0.0.1:8901
User-Agent: Guzzle/3.3.1 curl/7.24.0 PHP/5.3.15
Content-Type: application/x-www-form-urlencoded