Skip to content

Instantly share code, notes, and snippets.

View SnoringFrog's full-sized avatar

Ethan Piekarski SnoringFrog

View GitHub Profile
# Change command prefix to `
unbind C-b
set -g prefix C-n
bind C-n send-prefix
#unbind C-b
#set -g prefix `
#bind ` send-prefix
# Use 1-based indices for windows
set -g base-index 1
@SnoringFrog
SnoringFrog / check_applescript_version.applescript
Created January 27, 2016 17:25
Check current version of AppleScript
(* While trying to figure out what version of AppleScript I had installed,
I came across this article: https://www.safaribooksonline.com/library/view/applescript-in-a/1565928415/ch01s05.html
The problem? That article is from 2001 and no longer works!
The script provided in that article will *always* return 1.0 as your version,
because it just checks the version of the currently executing script (implicitly set to 1.0)
Instead, just use this script to output the version in a dialog.
*)
display dialog "You're running AppleScript " & version of AppleScript
@SnoringFrog
SnoringFrog / colemak_to_qwerty.sh
Created October 28, 2015 23:53
Colemak ↔ QWERTY (convert text typed in one layout to the other)
#!/usr/bin/env bash
while read line
do
echo "$line" | tr 'fpgjluy;rstdneiokFPGJLUY:RSTDNEIOK' 'ertyuiopsdfgjkl;nERTYUIOPSDFGJKL:N'
done < "${1:-/dev/stdin}"
@SnoringFrog
SnoringFrog / .Stupid Shebang Tricks
Last active March 30, 2017 10:24
Stupid Shebang Tricks - Various stupid things you can do by using the shebang to select unconventional interpreters.
Various stupid things you can do by using the shebang to select unconventional interpreters.