The attached ImageLoader helper will start fetching an image and return an image that is resolved once the image is...

When you run rake db:rollback and nothing happens, you are probably missing the latest migration file (or have not...

github.com

Adds missing native PostgreSQL data types to ActiveRecord and convenient querying extensions for ActiveRecord and Arel for Rails 4.x...

guides.rubyonrails.org

ActiveRecord offers an explain method similar to using EXPLAIN SQL statements on the database. However, this approach will explain all...

blog.skylight.io

Helix allows you to implement performance-critical code of your Ruby app in Rust, without requiring glue code to bridge...

makandra dev
github.com

This gem gives you a rake task db:seed:dump do create a db/seeds.rb from your current database state.

Instead of using this hack you might want to use MariaDB 10.x which can work with both old and...

OAuth requires a set of params to be carried along requests, among which a nonce. Some libraries pass these along...

makandra dev
robots.thoughtbot.com

When creating an index using CREATE INDEX, Postgres will create a B-Tree type index by default. The B-Tree...

jQuery's deferred objects behave somewhat like standard promises, but not really. One of many subtle differences is that there...

You can find out about disk space usage of all tables within your database by running this: SELECT table_name...

github.com

Stackprof is a sampling call-stack profile for Ruby 2.1+. Instead of tracking all method calls, it will simply collect...

If you are on a Linux shell and want to open a file with whatever default application is configured for...

Our preferred way of testing ActiveRecord is to simply create/update/destroy the record and then check if the expected behavior has...

Validations should be covered by a model's spec. This card shows how to test an individual validation. This is...

makandra dev

Cause logstaglia is so cool you may want to record a video. We're lucky: Logstalgia has a parameter for...

stackoverflow.com

From Rails 3.0.9, there is a method Hash#to_query that will turn a Hash into a query string:

makandra dev

Geordi is now (partially) tested with Cucumber. Yay! geordi cucumber supports a new @solo tag. Scenarios tagged with @solo...

github.com

Using Scenic, you can bring the power of SQL views to your Rails application without having to switch your schema...

makandra dev
elastic.co

Dashboard (Marvel Kibana) and query tool (Marvel Sense) for Elasticsearch. Once installed you can access Kibana and Sense at these...

makandra dev

Ever wondered how you can create a simple table output in bash? You can use the tool column for creating...

techblog.netflix.com

You login to a Linux server with a performance issue: what do you check in the first minute? uptime

SELECT pg_database.datname as "database_name", pg_database_size(pg_database.datname)/1024/1024 AS size_in_mb FROM pg_database ORDER...

postgresql.org

PostgreSQL offers a really handy field type: json. You can store any JSON there, in any structure. While its flexibility...