to create a Gallery that has a name and has_many :images, which in turn have a...

makandra dev
thecssninja.com

Sometimes you want to preload images that you will be using later. E.g. if hovering over a an area changes...

Edit /etc/default/bind9 and change OPTIONS="-u bind" to OPTIONS="-u bind -d 50 -g" Restart BIND and you'll see...

Many of our developers love to use the "awesome" window manager on Linux. However, RubyMine dialogs occasionally defocus while typing...

jquery.com

Since jQuery 3 saw it's first release candidate today, the links has a list of (breaking) changes.

brandcolors.net

brandcolors.net provides you with the colors of the world's biggest brands, easily searchable.

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

When you paste copied code with CTRL+V, RubyMine will change the indentation of the pasted code. You can prevent...

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...

developer.mozilla.org

When building a form with a file select field, you may want to offer your users a live preview before...

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...

Awesome is a very good tiling window manager that provides neat features like automatic layouting of windows, good multi-display...

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

This card existed before, but was outdated due to browser implementation changes. The information below is validated for the current...

gist.github.com

The NestedHash class allows you to read and write hashes of any depth. Examples: hash = {} NestedHash.write hash, 'a', 'b', 'c...

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

explainshell.com

Enter any command into explainshell and it will explain it to you: split into separate commands (if present), with each...

If you want to inspect the compiled code of your erb (or haml) templates, you can run the following code...

github.com

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

nginx.org

If you want to configure your nginx to drop connections to a specific location, you can do so by responding...

Imagine you have a list you want to render inline on large screens, but stacked on small screens. high

TL;DR There are three dimensions you can control when scoping routes: scope module: 'module', path: 'url_prefix', as: 'path...