makandra dev

Option 1: JSON dump In config/webpack/environment.js you can get inspect environment which includes all webpack config options set for the...

makandra dev

For webpages to load fast it's recommended to optimize images. Ideally an image's file size should be as...

stackoverflow.com

Ruby has this handy block shortcut map(&:to_i) for map { |x| x.to_i }. However, it is limited to argument...

Whenever is a Ruby gem that provides a nicer syntax for writing and deploying cron jobs. Leading zeros are important...

jsfiddle.net

When you need test images, instead of using services like lorempixel or placehold.it you may generate test images yourself.

Don't sum up columns with + in a sql-query if NULL-Values can be present. MySQL and PostgreSQL cannot...

makandra dev
github.com

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

stackoverflow.com

mysql> SELECT @@global.version; +------------------+ | @@global.version | +------------------+ | 5.6.30 | +------------------+ 1 row in set (0,00 sec) MySQL 5.6 Reference Manual says "BLOB and TEXT...

w3c.github.io

Here is how to use Chromedriver without libraries like selenium-webdriver. This can be useful for debugging. The following example...

Note netstat has mostly been superseeded by its more modern rewrite ss which nowadays comes pre-installed rather than netstat...

curl.haxx.se

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

web.archive.org

wrap the text with a span use line-height for the spacing between lines ("margin")

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

askubuntu.com

While the hardware mute button of my Lenovo x230 worked on Ubuntu 14.04 out of the box, it does not...

gist.github.com

Here is some JavaScript code that allows you to click the screen and get the clicked element's text contents...

makandra dev

In the ruby shell (IRB) and rails console the return value of the previous command is saved in _ (underscore). This...

I often see the use of || to set a default value for a variable that might be nil, null or...

Webpack is the future. We're using it in our latest Rails applications. For tests, we want to compile assets...

I needed to make sure that an element is visible and not overshadowed by an element that has a higher...

Typhoeus has a different way of representing array params in a get request than RestClient. Typhoeus: http://example.com/?foo[0]=1&foo[1]=2&foo[2]=3

Middleman is a static page generator that brings many of the goodies that Rails developers are used to.

This card compares patterns to store trees in a relation database like MySQL or PostgreSQL. Implementation examples are for the...

blog.jetbrains.com

RubyMine allows bookmarking lines of code. This is super-helpful when working on a complex problem. I've been using...