Skip to content

Instantly share code, notes, and snippets.

View wmdmark's full-sized avatar

Mark Johnson wmdmark

View GitHub Profile
@wmdmark
wmdmark / pro-quo-basic.js
Created December 29, 2011 21:36
ProQuo Basic Setup
$("blockquote.tweet").proQuo();
@wmdmark
wmdmark / rt.coffee
Created November 28, 2012 22:59
realtime
$ ->
pusher = new Pusher('')
channel = pusher.subscribe("sheet-#{sheetID}")
channel.bind 'signup', (data)->
item = window.sheetView.items.get(data._id)
item.set(data)
channel.bind 'update', (data)->
@wmdmark
wmdmark / CSClasses.coffee
Last active August 29, 2015 13:56
Classes in JS vs CS
class Person
init: (@dancing)->
dance: -> @dancing
class Ninja extends Person
swingSword: -> true
p = new Person(true)
p.dance() # => true
var ContactFormView = Backbone.View.extend({
el: "#contact-form-view",
render: function() {
this.binding = rivets.bind(this.el, {model: this.model});
},
remove: function() {
this.binding.unbind();
}
config here
@wmdmark
wmdmark / oxfordCommatize.coffee
Last active November 9, 2015 21:19
This function takes a list, returns a string, and is awesome.
oxfordCommatize = (list, conjuction)->
list[list.length-1] = "#{conjuction} #{list[list.length-1]}"
return list.join(", ")
@wmdmark
wmdmark / oxfordCommatize.js
Last active November 9, 2015 20:55
This function takes a list, returns a string, and is awesome.
oxfordCommatize = function(list, conjuction) {
list[list.length - 1] = (conjuction + " " + list[list.length - 1])
return list.join(", ")
}
@wmdmark
wmdmark / gist:f9327af8241b1aab1cc8a8797f49dbeb
Created August 9, 2016 14:44
complete-default-step.txt
Traceback (most recent call last):
File "/home/cbweb/.virtualenvs/coursebook/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/cbweb/coursebook/pathwright/apps/web_api/private/resources/path/step/completion/views.py", line 80, in step_completion_router
return view(request, *args, **kwargs)
File "/home/cbweb/.virtualenvs/coursebook/local/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
return view_func(*args, **kwargs)
File "/home/cbweb/.virtualenvs/coursebook/local/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view
return self.dispatch(request, *args, **kwargs)
File "/home/cbweb/.virtualenvs/coursebook/local/lib/python2.7/site-packages/rest_framework/views.py", line 466, in dispatch
@wmdmark
wmdmark / .eslintrc
Created May 23, 2017 15:00
Pathwright ESLint
{
"parser": "babel-eslint",
"extends": "airbnb",
"rules": {
"no-nested-ternary": 0,
"no-confusing-arrow": 0,
"no-use-before-define": 0,
"no-underscore-dangle": 0,
"no-mixed-operators": 0,
"camelcase": 0,
@wmdmark
wmdmark / reactgvl-code-of-conduct.md
Created September 10, 2017 17:19
The ReactGVL Code-of-Conduct

ReactGVL is dedicated to providing a welcoming experience for everyone, regardless of gender, age, sexual orientation, disability, physical appearance, race, ethnicity, religion, or technology choices. We do not tolerate harassment in any form. Sexual language and imagery is not appropriate for any meet up, including talks. Atendees violating these rules may be sanctioned or expelled from the event without at the discretion of the conference organizers.