ror, scala, jetty, erlang, thrift, mongrel, comet server, my-sql, memchached, varnish, kestrel(mq), starling, gizzard, cassandra, hadoop, vertica, munin, nagios, awstats
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module CancanLinkHelper | |
| def show_link(*args, &block) | |
| if block_given? && can?(:read, args[0]) | |
| object = args[0] | |
| html_options = args[1] || {} | |
| show_link(object, capture(&block), html_options) | |
| elsif can?(:read, args[0]) | |
| object = args[0] | |
| content = args[1] || glyph(:eye_open) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module SimpleForm | |
| module Inputs | |
| class DatePickerInput < SimpleForm::Inputs::StringInput | |
| def input_html_options | |
| value = object.send(attribute_name) | |
| options = { | |
| value: value.nil?? nil : I18n.localize(value, format: :datepicker), | |
| data: { | |
| behaviour: 'datepicker' | |
| } |
Below is a collection of my favourite responses I gathered from Guardian engineers when asked the question: What have you learnt starting from scratch and building a mobile-first next generation web platform for the Guardian?
- Work with great people.
- Deploy like crazy. This means the team has to control the infrastructure as well as code.
- Design is not a service. Designers have to sit in the team.
- Infrastructure is intrinsically unreliable. Discard and replace is the robust strategy.
- Use your CDN for HTML too.
- Don't always do as you are told.
NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths
Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @import compass/css3/transform | |
| .blueimp-gallery | |
| .video-js-box.video-content | |
| +transform-style(preserve-3d) | |
| .video-js.vjs-default-skin | |
| +translate(-50%, -50%) | |
| position: absolute | |
| left: 50% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| This is a Python script to extract GNOME/GTK's color scheme and apply it to Wine, so that the themes (approximately) match. | |
| Instructions: | |
| 1. Set your Gnome theme as you would like it | |
| 2. Run with a command like "python wine_colors_from_gtk.py" | |
| 3. Restart any apps running in Wine. They should match the Gnome theme colors now. | |
| Better description with screenshots here: http://www.endolith.com/wordpress/2008/08/03/wine-colors/ | |
| This is also stored on https://code.launchpad.net/~endolith/+junk/wine-color-scraper |
UPDATE a fork of this gist has been used as a starting point for a community-maintained "awesome" list: machine-learning-with-ruby Please look here for the most up-to-date info!
- liblinear-ruby: Ruby interface to LIBLINEAR using SWIG
- Indent using 2 spaces
- Use single quotes, unless you are writing JSON
- Declare one variable per var statement
- Variables and properties should use lower camel case capitalization
- Class names should be capitalized using upper camel case
- Constants should be declared as regular variables or static class properties, using all uppercase letters
- Use the triple equality operator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| In Gemfile | |
| ========= | |
| gem 'capistrano-rails' | |
| gem 'capistrano-rbenv' | |
| gem 'capistrano-rbenv-install' | |
| gem 'capistrano-safe-deploy-to' | |
| gem 'capistrano-sidekiq' | |
| gem 'capistrano3-puma' | |
| In Capfile |