Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am kevincolyar on github.
  • I am kevincolyar (https://keybase.io/kevincolyar) on keybase.
  • I have a public key ASA5w3B8nJSurTbASPVxz725ZlcJbWNIG6WMOTLZDVXmtgo

To claim this, I am signing this object:

sudo sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db "INSERT or REPLACE INTO access values ('kTCCServiceAccessibility', 'com.company.app', 0, 1, 0, NULL);"
@kevincolyar
kevincolyar / gist:6179757
Created August 7, 2013 23:00
CSS rule to fix Bootstrap from clobbering images embedded in ESRI KMLLayer
#map img {
/* Fixes bootstrap from clobbering KML png images */
max-width: none;
}
simulate :states => [s], :t => 0, :dt => lambda {|t| t+1} do
3.times do
states += step
end
end
@kevincolyar
kevincolyar / gist:4152218
Created November 27, 2012 03:41
Keymando Shortcuts
except /(iTerm|MacVim)/ do
map ";uic", Commands.ui_controls
map ";lc", Commands.left_click_element
map ";rc", Commands.right_click_element
map ";dc", Commands.double_click_element
map ";mi", Commands.show_current_app_menu_items
end
@kevincolyar
kevincolyar / gist:4128147
Created November 21, 2012 22:00
ClojureVim history mappings
autocmd FileType * if &ft == "vimclojure.clojure" | imap <c-k> <Plug>ClojureReplUpHistory. | endif
autocmd FileType * if &ft == "vimclojure.clojure" | imap <c-j> <Plug>ClojureReplDownHistory. | endif
@kevincolyar
kevincolyar / gist:2876495
Created June 5, 2012 17:42
Reload without losing focus
map "<Ctrl-Shift-R>" do
app = Accessibility::Gateway.get_application_by_name "Google Chrome"
reload = app.main_window.find.first_item_matching(:role => Matches.partial("button"),:description => Matches.exact("Reload"))
reload.press
end
@kevincolyar
kevincolyar / odbcinst.ini
Created February 3, 2012 16:43
/opt/local/etc/odbcinst.ini
[FreeTDS]
Decscription = FreeTDS driver for SQLServer
Driver = /opt/local/lib/libtdsodbc.so
Setup = /opt/local/lib/libtdsodbc.so
FileUsage = 1
@kevincolyar
kevincolyar / unmount_time_machine.rb
Created September 21, 2011 20:38
Mnemonic for unmounting your Time Machine disk
map "<Cmd-y>" do
input(
"etm" => lambda {
system('diskutil umount "/Volumes/Time Machine Backups"')
}
)
end
abbrev 'test' do
pasteBoard = NSPasteboard.generalPasteboard
pasteBoard.declareTypes([NSStringPboardType], owner: nil)
pasteBoard.setString('ಠ_ಠ', forType: NSStringPboardType)
send('<Cmd-v>')
end