Compiling ES6 syntax with Uglifier on

When you try to compile ES6 syntax with Uglifier gem initialized you get this error: ``` Uglifier::Error: (...) To use ES6 syntax, harmony mode must be e...

How to restore deleted git branch

Short and working solution to restore deleted git branch

How to add images (i.e. logo) to email messages while using Pony gem.

Pony gem allows to easily send good looking and customizable emails, but it doesn't provide a way to include image in a way that it will be displayed in gma...

Puppeteer - good library for generating pdf's from html.

Puppeteer is node library providing high level chromium api. One of it's key features is generating pdf from html using chromium web engine. This is great ad...

Prettier raw SQL in ruby

Use this syntax to format raw SQL nicely in ruby code. In some editors it also enables SQL syntax highlighting.

Use React.Fragment to avoid creating useless divs

This jsx ```react <React.Fragment> <h1>Hello World</h1> <p>This is paragraph</p> </React.Fragment> ``` Will be compiled into this html ```h...

How to clear sidekiq queue

How to clear sidekiq queue in 4 steps?

How to inspect an element that disappears on click (in chrome)

In chrome developer tools go to "Sources" find "Event Listener Breakpoints" and select "Mouse -> mousedown". Now each time the event is triggered, chrome wil...

Brakeman - An awesome gem that scans your app against vulnerabilities.

To use Brakeman, the only thing is to install the gem: ``` $ gem install brakeman ``` and then run the single command in Rails application's root dir...

Pundit Decorator

Organize Pundit error messages and redirects in a decorator. Simplify reuse and maintenance

Amazing js library to manipulate rendered table - Tabulator.js

Need filters, remote paginations, search field in table, selecting row and much more ... You will find everything in this library

Move last commit to a feature branch

When you accidentally commit to master/staging and need to move the commit to a feature branch

Close a frozen ssh session

Properly close a frozen ssh session

Set the same password for all users in one query

Reset devise passwords quickly, even for thousands of users.

Disable `Missing frozen string literal comment.` Rubocop warning

If you use a Rubocop-connected linter in your IDE, one thing that keeps driving you mad is `Missing frozen string literal comment.` warning. In this post, I'll show you how to disable it.

Generate fake screenshot mockups in minutes

This app allows you to upload screenshots and paste them into a fake phone/laptop mockup.

How to get image details like creation timestamp using MiniMagic

How to get image details like creation date and tile using MiniMagic

How to drop a production database in Rails 5

I encountered a problem when dropping a production database. Here's the solution

How to show macOS notification from Bash?

Sometimes some task takes a long time and you want to know when it finishes. The system can show you desktop notification with predefined (or added as variable) message.

Style PDFs using metric units in CSS with wicked pdf

Configure wicked_pdf with: ```ruby disable_smart_shrinking: true ``` Then you can accurately use `mm` and `cm` as units in your CSS