Skip to content

Instantly share code, notes, and snippets.

View stravawatts's full-sized avatar

Mike Watts stravawatts

View GitHub Profile
--langdef=coffee
--langmap=coffee:.coffee
--regex-coffee=/^class @?([a-zA-Z_$.][0-9a-zA-Z_$.]*)( extends [a-zA-Z_\$][0-9a-zA-Z_$.]*)?$/\1/c,class/
--regex-coffee=/^[ \t]*(@|this\.)([a-zA-Z_$][0-9a-zA-Z_$]*).*$/\2/e,export/
--regex-coffee=/^[ \t]*@?([a-zA-Z_$][0-9a-zA-Z_$]*):.*[-=]>.*$/\1/f,function/
--regex-coffee=/^[ \t]*([a-zA-Z_$][0-9a-zA-Z_$]*)[ \t]+=.*[-=]>.*$/\1/f,function/
--regex-coffee=/^[ \t]*([a-zA-Z_$][0-9a-zA-Z_$]*)[ \t]+=[^->\n]*$/\1/v,variable/
--regex-coffee=/^[ \t]*@?([a-zA-Z_$][0-9a-zA-Z_$]*):.*$/\1/p,property/
set nocursorline " don't highlight current line
" keyboard shortcuts
inoremap jj <ESC>
" map <F2> :mksession! ~/.vimsession <CR> " Quick write session with F2
" map <F3> :source ~/.vimsession <CR> " And load session with F3
" imap <F13> <Insert>
map <leader>r :NERDTreeFind<CR>
noremap <F5> :CommandTFlush<CR>
@stravawatts
stravawatts / gist:8424162
Last active January 3, 2016 06:39
Garmin Plugin Debugging Paste this code into browser console after loading this page: http://www.strava.com/upload/garmin
// Garmin Plugin Debugging
// Paste this code into browser console after loading this page:
// http://www.strava.com/upload/garmin
var garminDeviceView = new Strava.Uploads.GarminDeviceView({el: $('#garminDevice')});
var garminPluginView = new Strava.Uploads.GarminPluginView({el: $('#uploadGarmin'),currentAthleteId: 1,deviceView: garminDeviceView,garminHostKeys: [["http://app.strava.com","4404618db74ce0651b9adc0ac81993ce"],["http://www.strava.com","24d77c9983b017543e8050b79eafad89"],["http://strava.com","b8a2037a6254b296d107d97277c92845"],["http://app.dev.strava.com","5f49363b279bb0caac63201080f2f4fa"],["http://dev.strava.com","509ee0961b3dea0cc24e19cafff5fc52"],["http://www.dev.strava.com","4617909f55f77fbcd4cae0eb8579bb93"]],dateFormat: 'mm/dd/yy'});
garminPluginView['checkDeviceSupport'] = function(device) {var gd = new Strava.Uploads.GarminDevice(device);console.log("description string: " + gd.descriptionString);if (gd.type == gd.EDGE && gd.number == gd.EDGE_500 && this.pluginController.pluginVersion() <