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

stackoverflow.com

Your default postgres user is named like your linux user. That default user has limited access privileges, which can cause...

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

If you want to make a screenshot of a website that works well in print or on a high-DPI...

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

To check which elements an ActiveRecord relation contains use the contain_exactly matcher. describe User do let!(:admin) { create(:user...

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

makandra dev

If your Angular app has some decent complexity, it will not be easy to use UI Router straight away. Here...

github.com

When an Rspec example fails, I usually investigate by running that example again using rspec . However, this does not work...

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 folder images and want to to move all files in there to a new...

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