railscasts.com

See this Railscast. Basically you can simply write views like index.xlsx.erb: ID Name Release Date Price <% @products.each do |product| %> <%= product.id...

Write a // and indent every subsequent line by two spaces. This is great for documenting BEM blocks! // An action button...

SELECT table_name, table_rows FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'your_database' order by table_rows;

robots.thoughtbot.com

Good article about window functions. Also note how they use a postgres feature called common table expressions.

This guide shows how to create an AngularJS application that consumes more and more memory until, eventually, the browser process...

xaprb.com

The linked article explains how to get a database-wide lock without creating table rows: This article explains how I...

nandovieira.com

Postgres 9.4 introduces a new column type: jsonb. json and jsonb columns store data differently, so just compare the two...

When you are using the #selector_for helper in Cucumber steps, as e.g. Spreewald does, the following snippet will save...

guides.rubyonrails.org

When running migrations with rake db:migrate, there's the STEP and VERSION parameters that you can pass to nearly...

tldr; Use git diff -M or git diff --find-renames when you've moved a few files around. Usage

This will list all branches matching your query as input options for git checkout greckout ar 1) ar/cache-api-keys-1098...

If you want to load an SQL dump from an ActiveRecord migration, you might find this to be harder than...

makandra dev
github.com

Geordi 1.0 features a command line application geordi, that holds most of Geordi's previous commands. New features

Add gem 'database_cleaner' to your Gemfile. Then: Cucumber & Rails 3+ # features/support/database_cleaner.rb DatabaseCleaner.clean_with(:deletion) # clean once, now DatabaseCleaner.strategy = :transaction...

phpied.com

Some insight into how browser rendering engines work. The article shows how the way you manipulate styles (and the DOM...

matchingnotes.com

Sequel is an awesome ORM such as ActiveRecord. The linked article describes how easily you can implement and use materialized...

Here is a Javascript function reloadUsers() that fetches a HTML snippet from the server using AJAX and replaces the current...

JavaScript objects can have getter and setter functions that are called when a property is read from or written to...

github.com

Capybara-screenshot can automatically save screenshots and the HTML for failed Capybara tests in Cucumber, RSpec or Minitest. Requires Capybara...

pgcli.com

A CLI for working with Postgres databases. Ships with auto-completion and syntax highlighting.

edgeguides.rubyonrails.org

Rails guide that covers PostgreSQL-specific column types and usages for Active Record. You should especially keep in mind the...

When accepting GIF images, you will also accept animated GIFs. Resizing them can be a time-consuming task and will...

airpair.com

A lot of the advice involves less separations of concerns in your code ("don't use $watch", "don't use...

tutorialzine.com

A very clever hack to parse a structured URL object is to create a element and set its href to...