$ rails g model User
belongs_to
has_one
| for (var i=1; i <= 20; i++) | |
| { | |
| if (i % 15 == 0) | |
| console.log("FizzBuzz"); | |
| else if (i % 3 == 0) | |
| console.log("Fizz"); | |
| else if (i % 5 == 0) | |
| console.log("Buzz"); | |
| else | |
| console.log(i); |
⇐ back to the gist-blog at jrw.fi
Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.
I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.
This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso
| jQuery ($) -> | |
| $('.add_fields').each -> | |
| $this = $(this) | |
| insertionNode = $this.data('association-insertion-node') | |
| insertionTraversal = $this.data('association-insertion-traversal') | |
| if (insertionNode) | |
| if (insertionTraversal) | |
| insertionNode = $this[insertionTraversal](insertionNode) | |
| else |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| Rails as it has never been before :) | |
| Rails 3 AntiPatterns, Useful snippets and Recommended Refactoring. | |
| Note: Some of them are collected from different online resources/posts/blogs with some tweaks. |
| docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt |