<VoiceEng>
<AGC>0</AGC>
<MicVolume>77</MicVolume>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// > defaults write -g NSTextKillRingSize -string 6 | |
// replace yank: command with yankAndSelect for use with the kill ring | |
"^y" = (yankAndSelect:); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
# in the main tweet parser. tweet_text is the status.text string | |
# match short campl.us urls: | |
if tweet_text =~ /\((http:\/\/campl.us\/\w+?)\)/ | |
picurl = $1 | |
# grab the source and parse out the full size image url | |
final_url = get_body(picurl).match(/"(http:\/\/pics.campl.us\/f\/c\/.+?)"/) | |
return false if final_url.nil? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The standard CGI environmental variables are available as read-only attributes of a CGI object. The following is a list of these variables: | |
AUTH_TYPE HTTP_HOST REMOTE_IDENT | |
CONTENT_LENGTH HTTP_NEGOTIATE REMOTE_USER | |
CONTENT_TYPE HTTP_PRAGMA REQUEST_METHOD | |
GATEWAY_INTERFACE HTTP_REFERER SCRIPT_NAME | |
HTTP_ACCEPT HTTP_USER_AGENT SERVER_NAME | |
HTTP_ACCEPT_CHARSET PATH_INFO SERVER_PORT | |
HTTP_ACCEPT_ENCODING PATH_TRANSLATED SERVER_PROTOCOL | |
HTTP_ACCEPT_LANGUAGE QUERY_STRING SERVER_SOFTWARE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Carbon/Carbon.h> | |
// `keys` utility for checking whether a modifier key is held | |
// From <http://lists.apple.com/archives/applescript-users/2009/Sep/msg00374.html> | |
// | |
// $ clang keys.m -framework Carbon -o keys | |
int main (int argc, const char * argv[]) { | |
unsigned int modifiers = GetCurrentKeyModifiers(); | |
if (argc == 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Launch All in Dock.applescript | |
-- Brett Terpstra 2012 | |
-- | |
-- Modified version of an AppleScript to launch all | |
-- persistent (Keep in Dock) apps[^1]. Allows you to exclude | |
-- apps based on modifier keys held when it runs. | |
-- | |
-- Uses the `keys` utility found on the Apple Mailing Lists[^2]. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
// Keybinding for Sublime Text to wrap selection in hashmarks with padding space, incrementally up to six marks | |
{ "keys": ["#"], "command": "insert_snippet", "args": {"contents": "#${0: ${SELECTION/(^ | $)//g} }#"}, "context": | |
[ | |
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }, | |
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true }, | |
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "#{6}", "match_all": true } | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
# nvAir: a First Class way to use nvALT/Notational Velocity with the worst documentation ever! | |
# Built by: Brett Terpstra, <http://brettterpstra.com> | |
# Destination: WikiLinks and [[wiki links]] to nvALT notes from anywhere on your system. | |
# This script is at your Service. (You can make it into a System Service with Automator, I mean). | |
# | |
# Security line is short today! Please have a photo id in hand. | | |
# I just need to see your ticket and the folder where you store your note files. o_________(_)________o | |
$notes_path = '~/Dropbox/nvALT2.2/' # o^o X \_/ X o^o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
img = ARGV[0] | |
width = %x{sips -g pixelWidth #{img}|tail -n 1}.gsub(/pixelWidth: /,'').strip | |
height = %x{sips -g pixelHeight #{img}|tail -n 1}.gsub(/pixelHeight: /,'').strip | |
output = %Q{<img src="#{File.basename(img)}" style="width:#{width}px;height:#{height}px">} | |
print output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var bt = {}; // to call the functions outside of the jQuery wrapper because OctoPress is a bit of a JS mess. Hey, that rhymes. | |
(function($){ | |
bt = { | |
checkWinWidth: function() { | |
var width = $(window).width(); | |
if (width <= 500) { | |
if (!$('body').hasClass('mobile')) { | |
$('img').each(function(){ | |
var $this = $(this); |