Skip to content

Instantly share code, notes, and snippets.

View victornava's full-sized avatar

Victor Nava victornava

  • Melbourne, Australia
View GitHub Profile
@victornava
victornava / README.md
Last active May 8, 2018 23:47
CSS Debug: Shows an outline of html elements

CSS Debug

Shows an outline of html elements. Useful to debug spacing between elements issues.

Usage

Load css-debug.js from the console then press the key i and you should see something like this:

screen shot 2018-05-09 at 9 40 40 am

Alternatively you can create a bookmarklet by pasting css-debug-bookmarklet.js in the address bar and saving as favourite.

# Normal way of creating a Lambda
L = -> (x) { "#{x} is cool" }
# And calling it
puts L.("Ruby") # => Ruby is cool
# You can also create it with out the parenthesis for the argument
@victornava
victornava / body
Created August 18, 2012 13:52
test
Suppose we have some nested resources:
resources 'projects' do
resources 'todo_lists'
end
running rake routes gives us the following helper methods to access the resources:
project_todo_lists GET /projects/:project_id/todo_lists(.:format) todo_lists#index
POST /projects/:project_id/todo_lists(.:format) todo_lists#create