Skip to content

Instantly share code, notes, and snippets.

View opyh's full-sized avatar

Sebastian Felix Zappe opyh

View GitHub Profile
@akuzemchak
akuzemchak / Side Bar.sublime-menu
Created August 13, 2011 15:35
Reveal folder in Finder for Sublime Text 2
# add this to the main command array...
{ "caption": "Open Containing Folder…", "command": "open_this_folder", "args": {"dirs": []} }
@leshill
leshill / resource_responder.rb
Created August 10, 2011 18:29
Responding to a JSON PUT with either a 200 and the updated JSON or 204 and no body
# The default Responder returns 200, {} for a PUT success.
# Not really happy with that. A 204, nil would be better.
# However, for most resources the result of a PUT is that something changes (updated_at).
# A 200 with the updated resource makes sense in that case.
#
# Not really happy with this first cut.
#
class ResourceResponder < ActionController::Responder
protected
@aiwilliams
aiwilliams / config.rb
Created May 2, 2011 21:31
Sprockets producing Handlebars templates from Haml
http_path = "/"
css_dir = "public/stylesheets"
sass_dir = "sass"
images_dir = "public/images"
http_images_dir = "images"
javascripts_dir = "public/javascripts"
fonts_dir = "public/fonts"
http_fonts_dir = "fonts"