Skip to content

Instantly share code, notes, and snippets.

Oliver Taylor olivertaylor

Block or report user

Report or block olivertaylor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@olivertaylor
olivertaylor / control_tab_karabiner_remap
Created Jul 31, 2016
Karabiner autogen for remaping control+tab to change Safari tabs.
View control_tab_karabiner_remap
<appdef>
<appname>SAFARI</appname>
<equal>com.apple.Safari</equal>
</appdef>
<item>
<name>Control Tab to Cmd+Shift+] in Safari</name>
<appendix>Changes Control+tab to the shortcuts for next/previous tab</appendix>
<identifier>controlTab2commandBracket</identifier>
<only>SAFARI</only>
<autogen>
View vimrc
" Keeping your lovely 'vimrc' INSIDE of your 'vim' directory is a good idea,
" if only because it makes it easier to move your config around.
" If you are using 7.4 exclusively, the following will be enough:
"
" on Unix-like systems ~/.vim/vimrc
" on Windows %userprofile%\vimfiles\vimrc
" If you use both 7.4 and an older version, or only an older version,
" the simplest, future-proof, solution is to put this line and only
View gist:7bb644751bcafc81c2ef
If you want your terminal vim to open files you double click, follow the following steps (MacOS only):
1. Open Automator
2. Select Application
3. Copy the attached file
4. Save and set as default for opening files
Multiple files are opened in vim tabs.
If there is already a vim instance running, files are opened in it.
@olivertaylor
olivertaylor / pinmarks
Created Jul 26, 2013
Pinmarks - a simple script that downloads your pinboard.in bookmarks and dumps them into a pretty HTML file.
View pinmarks
#!/usr/bin/ruby
# ----------------------------------------------------------------------
# Pinmarks is a simple script that downloads your Pinboard.in bookmarks
# and dumps them into a pretty HTML file.
# ----------------------------------------------------------------------
# Start by defining your username and password
username = ""
password = ""
View tabset.applescript
-- from "http://www.leancrew.com/all-this/2012/10/saving-browser-tab-sets/"
-- Assume the frontmost Finder window (or the Desktop)
-- is where we want to store the script.
try
tell application "Finder" to set defaultFolder to the folder of the front window
on error
set defaultFolder to (path to desktop)
end try
@olivertaylor
olivertaylor / get document lang.applescript
Created May 21, 2013
Asks BBEdit for the current document's language
View get document lang.applescript
tell application "BBEdit"
set docLang to source language of text document 1
if (docLang is missing value) then set docLang to "Plain text"
end tell
@olivertaylor
olivertaylor / copy_mail_url.applescript
Last active Dec 17, 2015
Send selected Mail.app message's URL to the clipboard
View copy_mail_url.applescript
tell application "Mail"
set _sel to get selection
set _links to {}
repeat with _msg in _sel
set _messageURL to "message://%3c" & _msg's message id & "%3e"
set end of _links to _messageURL
end repeat
set AppleScript's text item delimiters to return
set the clipboard to (_links as string)
end tell
@olivertaylor
olivertaylor / bbedit position info.applescript
Last active Dec 17, 2015
Ask BBEdit for the position of the cursor, and if there is a selection
View bbedit position info.applescript
tell application "BBEdit"
tell the selection to set _length to the length of selection
tell the selection to set _column to startColumn
end tell
@olivertaylor
olivertaylor / Best 2007 Movies.md
Last active Dec 12, 2015
A Partial List of Movies Released in 2007
View Best 2007 Movies.md

A Partial List of Movies Released in 2007

compiled: 2013-02-12

  • 3:10 To Yuma
  • Assassination Of Jessie James By The Coward Robert Ford
  • Atonement
  • Before The Devil Knows You’re Dead
  • Black Snake Moan
@olivertaylor
olivertaylor / Move cursor to previous paragraph.applescript
Last active Oct 9, 2015
Tell BBEdit to move cursor to beginning of previous paragraph
View Move cursor to previous paragraph.applescript
try
tell application "BBEdit"
find "(?<=\\r^\\r|\\A)(?=[^\\r])" searching in text of front text window options {search mode:grep, wrap around:false, backwards:true, case sensitive:false} with selecting match
end tell
end try
You can’t perform that action at this time.