makandra dev
github.com

geordi delete_dumps [directory] Recursively search for files ending in *.dump and offer to delete those. When no...

You might have some trouble running a Rails LTS 2 app with MySQL 5.7. If you don't want to...

MySQL and MariaDB have an SQL mode setting which changes how MySQL behaves. The SQL mode value is comprised of...

Running rails server will start a local server that you can access via http://localhost:3000. When you are working...

Form fields can be rendered as noneditable by setting the disabled or the readonly attribute. Be aware of the differences...

This should not be necessary in any case and is only for special cases, for e.g. if the assets...

Trying to open a vnc window with geordi geordi vnc ended up with this error: > VNC viewer could not be...

makandra dev

When a Rails controller action should handle both HTML and JSON responses, do not use request.xhr? to decide that. Use...

Understanding your type of cronjob Some cronjobs must only run on a single server. E.g. when you run nightly batch...

If your Rails application is using Webpack you need to serve assets on the same host as you application runs...

This is painful. Consider using Microsoft Office or switching careers. If you need to write < 20 letters consider doing it...

makandra dev
makandracards.com

Rails applications and ruby gems should have a README that gives the reader a quick overview of the project. Its...

makandra dev
curl.haxx.se

When making requests using curl, no cookies are sent or stored by default. However, you can tell curl to re...

By default, browsers will not wrap text at syllable boundaries. Text is wrapped at word boundaries only. This card explains...

httpie.org

HTTPie consists of a single http command designed for painless debugging and interaction with HTTP servers, RESTful APIs, and web...

You are not using javascript tests The file is served from a public folder (not via controller) Problem description...

makandra dev

An end-to-end test (E2E test) is a script that remote-controls a web browser with tools like Selenium...

When your public-facing application has a longer downtime for server maintenance or long migrations, it's nice to setup...

Browsers support different types of redirects. Be very careful with these status codes: 301 Moved Permanently 308 Permanent Redirect

Slides for Henning's talk on Sep 21st 2017. Understanding sync vs. async control flow Talking to synchronous (or "blocking...

If you are using PDFKit / wkhtmltopdf, you might as well want to use custom fonts in your stylesheets. Usually this...

Let's say you have a form that you render a few times but you would like to customize your...

If another session is accessing your database you are trying to reset or drop you might have seen the following...

docs.ruby-lang.org

Use return to return from a method. return accepts a value that will be the return value of the...