Skip to content

Instantly share code, notes, and snippets.

@patrickwelker
patrickwelker / Travel-Checklist.md
Created September 22, 2015 16:49
My Travel Checklist

Cloths

  • Underpants
  • Socks
  • T-Shirts
  • Trousers
  • Pullovers
  • Jacket
  • Shoes
  • Glasses
@patrickwelker
patrickwelker / private.xml
Last active September 1, 2015 18:30
My `private.xml` for Karabiner (https://pqrs.org/osx/karabiner/index.html.en).
<?xml version="1.0"?>
<root>
<item>
<name>My Custom Keys</name>
<!-- Caps Lock = Hyper is setup via Seil -->
<item>
<name>F19 to F19</name>
<appendix>F19 to Hyper (ctrl+shift+cmd+opt)</appendix>
<appendix>(+ F19 Only, send escape)</appendix>
<identifier>private.f19-to-f19-and-escape</identifier>
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump | grep -B6 bindings:.*:

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

@patrickwelker
patrickwelker / Start Podcast Recording.scpt
Last active August 29, 2015 14:06
Podcasting Scripts
on run
# Disable Notification Center
#do shell script "launchctl load /System/Library/LaunchAgents/com.apple.notificationcenterui.plist" # Depracted in Yosemite
tell application "System Events"
option key down
delay 0.2
try
click menu bar item "Notification Center" of menu bar 2 of application process "SystemUIServer"
end try
@patrickwelker
patrickwelker / guess-editor.scpt
Created May 18, 2014 19:25
AppleScript for guessing the text editor you currently use. It's intended to be used in Keyboard Maestro. Read more here: http://rocketink.net/2014/05/upload-to-gist.html.
set activeEditorsList to {}
set appList to {"nvALT", "FoldingText", "Byword", "Mou", "Sublime Text", "MultiMarkdown Composer"}
-- Generate variable with running apps
tell application "System Events"
set activeProcesses to (name of every process)
end tell
-- Generate list of running text editors
repeat with appName in appList
/* Solarized Dark
For use with Jekyll and Pygments
http://ethanschoonover.com/solarized
SOLARIZED HEX ROLE
--------- -------- ------------------------------------------
base03 #002b36 background
base01 #586e75 comments / secondary content
.highlight .hll { background-color: #49483e }
.highlight { background: #272822; color: #f8f8f2 }
.highlight pre { background: transparent; color: #f8f8f2 }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight{background-color:#073642;color:#93a1a1}.highlight .c{color:#586e75 !important;font-style:italic !important}.highlight .cm{color:#586e75 !important;font-style:italic !important}.highlight .cp{color:#586e75 !important;font-style:italic !important}.highlight .c1{color:#586e75 !important;font-style:italic !important}.highlight .cs{color:#586e75 !important;font-weight:bold !important;font-style:italic !important}.highlight .err{color:#dc322f !important;background:none !important}.highlight .k{color:#cb4b16 !important}.highlight .o{color:#93a1a1 !important;font-weight:bold !important}.highlight .p{color:#93a1a1 !important}.highlight .ow{color:#2aa198 !important;font-weight:bold !important}.highlight .gd{color:#93a1a1 !important;background-color:#372c34 !important;display:inline-block}.highlight .gd .x{color:#93a1a1 !important;background-color:#4d2d33 !important;display:inline-block}.highlight .ge{color:#93a1a1 !important;font-style:italic !important}.highlight .gr{color:#aa0000}.highlight .gh{color:#586e
#!/usr/bin/env python
"""
organize-photos.py - Organize an unstructured folder tree of photos and movie
files into a month-and-year folder structure.
Note: This is a minor rewrite of @cliss's extension [1,2] of @drdrang's
photo management scripts [3], and includes a tweak from @jamiepinkham [4,5].
The lists of raw [6] and video [7] file extensions were found elsewhere.