Skip to content

Instantly share code, notes, and snippets.

View ak-is-ok's full-sized avatar

Aleksandr Kalashnikov ak-is-ok

View GitHub Profile
@ak-is-ok
ak-is-ok / gem
Last active December 28, 2015 05:39
Configurations
# ~/.gemrc
install: --no-rdoc --no-ri
update: --no-rdoc --no-ri
@ak-is-ok
ak-is-ok / rails_resources.md
Created February 12, 2014 10:30 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h
function load_script(src) {
var head = document.getElementsByTagName('head')[0],
script = document.createElement('script');
script.type = 'text/javascript';
script.src = src;
head.appendChild(script);
}
function load_jquery(version) {
if(version == undefined) {
@ak-is-ok
ak-is-ok / application_decorator.rb
Created April 25, 2014 09:43
I18n lazy lookup in draper decorators
class ApplicationDecorator < Draper::Decorator
delegate_all
private
def translate(*args)
key = args.first
if key.is_a?(String) && (key[0] == '.')
underscored_scope = self.class.name.gsub('Decorator', '').underscore
args[0] = underscored_scope + key