Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| body { | |
| -webkit-font-smoothing: antialiased; | |
| text-rendering: optimizeLegibility; | |
| -moz-osx-font-smoothing: grayscale; | |
| } | |
| .tree-view-resizer, .editor { | |
| ::-webkit-scrollbar { | |
| width: 0.5em; | |
| height: 0.5em; |
| # Drop this into /spec/support/matchers | |
| # Usage: result.should be_url | |
| # Passes if result is a valid url, returns error "expected result to be url" if not. | |
| # Matcher to see if a string is a URL or not. | |
| RSpec::Matchers.define :be_url do |expected| | |
| # The match method, returns true if valie, false if not. | |
| match do |actual| | |
| # Use the URI library to parse the string, returning false if this fails. | |
| URI.parse(actual) rescue false |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| require 'active_support/core_ext/array' | |
| class Garden | |
| attr_reader :layout, :grouped_by_student, :students | |
| def initialize(layout, students = Garden.default_students) | |
| @students = students | |
| @layout = Garden.parse(layout) | |
| @grouped_by_student = group_by_student | |
| define_student_lookups |
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
| # See a video of this at: http://www.youtube.com/watch?v=jlKt2Ed-Y04&feature=youtu.be | |
| require 'ardrone' | |
| drone = ARDrone::Drone.new | |
| drone.start | |
| drone.take_off | |
| sleep 5 | |
| drone.turn_right(1.0) |
| # From inside a Rails root directory | |
| # After you call save_and_open_page in Capybara (and you don't have or want launchy) | |
| open -a "Google Chrome" "tmp/capybara/"`ls -tr tmp/capybara/ | head -2 | tail -1` |
| var app = require('express').createServer() | |
| var io = require('socket.io').listen(app); | |
| var fs = require('fs'); | |
| app.listen(8008); | |
| // routing | |
| app.get('/', function (req, res) { | |
| res.sendfile(__dirname + '/chat.html'); | |
| }); |