Skip to content

Instantly share code, notes, and snippets.

@clintxs
clintxs / .slate
Last active January 4, 2016 14:39
My settings for the [Slate](https://github.com/jigish/slate) app. Credit to zdw for [his .slate config](https://gist.github.com/zdw/5355257).
config defaultToCurrentScreen true
config modalEscapeKey esc
# Set a percentage or number of pixels to move the window when using nudge
alias nudge-amount 80
# I map most of my hotkeys to cmd+ctrl+alt, which I have remapped to my
# caps lock key. This is just an easy way to refer to that key.
alias hyper cmd;ctrl;alt
@clintxs
clintxs / dterm-ish.applescript
Last active December 15, 2015 12:29
A quick and dirty DTerm-like script for Alfred 2. To install, go into Alfred 2's preferences, click the Features tab, and click Terminal in the sidebar. Set Application to 'Custom', and paste the script in. Now you can just use the terminal command as usual (defaults to '>') and be able to run commands on the frontmost document of any supporting…
-- This script automatically `cd`s to the directory of the current document.
-- You can use $f to represent the file for the current document.
-- This is nowhere near perfect, just a quick and dirty script.
-- NOTE: you need to have "Enable access for assistive devices" checked...
-- in the Accessibility preference pane.
-- Example: select a file in Finder, and type: echo The filename is $f
on getCurrentDocument()