Skip to content

Instantly share code, notes, and snippets.

View mbierman's full-sized avatar

Michael Bierman mbierman

View GitHub Profile
@mbierman
mbierman / pullme.bash
Created December 26, 2012 18:32
Bash script to pull a bunch of directories and exclude a few by name.
#!/bin/bash
START_HERE="/Users/mbierm1/git";
cd $START_HERE;
echo -e "\nPulling down latest for $START_HERE\n";
for d in $(find . -maxdepth 1 -mindepth 1 -type d -not \( -name dir_1 -o -name dir_2 \) ); do
echo -e "$d";
@mbierman
mbierman / SoundOutput.applescript
Last active December 10, 2015 03:58
Set the Audio Output on OSX
set asrc to (choose from list {"Internal Speakers", "Living Room", "Girl's Room", "Master Bedroom"} with title "Sound Picker" default items {"Internal Speakers"}) as text
if result is "false" then return
-- for debugging
-- display dialog "src is: " & asrc
tell application "System Preferences"
reveal anchor "output" of pane id "com.apple.preference.sound"
@mbierman
mbierman / gist:3232318
Created August 2, 2012 01:36
Preview HTML from TextWrangler in Safari
-- Based on Sam Dutton's http://goo.gl/27XlZ script
-- which was based on Mike Piontek's script http://goo.gl/SBkkL
-- this is Safari specific
-- see https://gist.github.com/3232063 for a Chrome Script.
tell application "TextWrangler" to set theFile to file of document 1
tell application "TextWrangler" to save document 1
set appleScriptPath to theFile as text
set currentURL to POSIX path of appleScriptPath
@mbierman
mbierman / gist:3232063
Created August 2, 2012 00:57
AppleScript to preview the current file in TextWranger in Chrome.
-- Based on Sam Dutton's script (http://goo.gl/27XlZ)
-- which was based on Mike Piontek's script (http://goo.gl/SBkkL)
-- This is Chrome specific. See https://gist.github.com/3232318 for a Safari Script
tell application "TextWrangler" to set theFile to file of document 1
tell application "TextWrangler" to save document 1
set appleScriptPath to theFile as text
set currentURL to POSIX path of appleScriptPath
set currentURL1 to POSIX path of appleScriptPath
HTTP/1.1 200 OK
Date:
Thu, 17 May 2012 00:53:35 GMT
Content-Length:
565
Set-Cookie:
rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Wed, 16-May-2012 00:53:36 GMT
Content-Type:
application/json
Connection:
@mbierman
mbierman / apigeeconsole.html
Created May 3, 2012 08:33
How to make an embedded Apigee console for API documentation
<iframe src="https://apigee.com/embed/console/twitter?v=2" height="100%" width="100%" scrolling="no"></iframe>
<!--
How to make an embedded Apigee API v2 Console
Simply go to https://apigee.com/togo and create a console. Then, you'll get an iframe code similar to the one above with your Console and you can embed anywhere you like.
The "?v=2" is a new way to get the latest Apigee Console. More details to come!
-->