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.

workaround.org

You will need to look here and find your own device. Look for the "bootable CD" download, which will give...

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

Create htpasswd entry and print to stdout: $ sudo apt install apache2-utils # Optional $ htpasswd -n $USERNAME New password:

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

github.com

Uses FFI and works all relevant operating systems. If you'd try to do it yourself, you'd have to...

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

A HTTP 302 Found redirect to PATCH and DELETE requests will be followed with PATCH or DELETE. Redirect responses to...

makandra dev

In JavaScript we often use Immediately Invoked Function Expessions (or IIFEs) to prevent local variables from bleeding into an outside...

stackoverflow.com

First, decide if you want to pull with rebase. There are some implications of changing this, so think before you...

During debugging you might pepper your code with lines like these: console.log('foo = ' + foo + ', bar = ' + bar) I recommend to use...

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