Skip to content

Instantly share code, notes, and snippets.

@bhurlow
bhurlow / gist:3034578
Created July 2, 2012 17:52
disable vim wrap
:set nowrap
@bhurlow
bhurlow / gist:3035758
Created July 2, 2012 21:19
Google Latitude and Longitude constructor
var LATLANG = new google.maps.LatLng(45,-93)
@bhurlow
bhurlow / gist:3043629
Created July 3, 2012 21:57
Linux Screen Cheat Sheets
–ctrl a c -> cre­ate new win­dow
–ctrl a A -> set win­dow name
–ctrl a w -> show all win­dow
–ctrl a 1|2|3|… -> switch to win­dow n
–ctrl a ” -> choose win­dow
–ctrl a ctrl a -> switch between win­dow
–ctrl a d -> detach win­dow
–ctrl a ? -> help
–ctrl a [ -> start copy, move cur­sor to the copy loca­tion, press ENTER, select the chars, press ENTER to copy the selected char­ac­ters to the buffer
–ctrl a ] -> paste from buffer
@bhurlow
bhurlow / gist:3062738
Created July 6, 2012 21:03
coffee script recursive watching
watch -n3 "find -iname \"*.coffee\" | xargs coffee -c"
@bhurlow
bhurlow / gist:3067634
Created July 7, 2012 18:44
Open all files in a directory in separate windows in vim
vim -O *
@bhurlow
bhurlow / gist:3134165
Created July 18, 2012 04:21
How I set up require.js
require(
[ 'jquery',
'graphs',
'underscore',
'ezlog',
'backbone',
'goog!visualization',
'bootstrap'
],
@bhurlow
bhurlow / gist:3217771
Created July 31, 2012 15:20
A new data type called "Jxsonml"
[
"<?xml version='1.0'?>" : {
"<note>" : "<to>Tove</to>"
"<from>" : "Jani</from>"
"<heading>Reminder</heading>" : "</note>"
}
@bhurlow
bhurlow / gist:3217906
Created July 31, 2012 15:38
Some of my fav methods
JSON.parsify
@bhurlow
bhurlow / app.coffee
Created August 13, 2012 15:11
Backbone Drawer bound to window object
App.Views.Drawer = App.UI.extend {
elem: null
events:
'touchstart' : 'windowTouchStart'
'touchmove' : 'drawerMove'
make: ->
@bhurlow
bhurlow / Backbone View
Created August 17, 2012 18:15
Backbone Drag and Drop (quick and dirty)
DragDrop = Backbone.View.extend {
render: () ->
thisView = this
dragArea = @options.drag
dropArea = @options.drop
dropAreaY = $(dropArea).offset().top
dropAreaX = $(dropArea).offset().left