Move last commit to a feature branch

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

How to be up to date with Ruby and Ruby On Rails releases

Ruby releases: https://www.ruby-lang.org/en/downloads/releases/ Ruby On Rails releases: https://rubygems.org/gems/rails/versions

How to hold Mac from going into sleep?

Every Mac owner knows how painful it is if their SSH session with a very important process just disconnects because of Mac going into sleep. Hopefully, there's a way to tell macOS that you don't want it to sleep - and here, you'll learn how to do it.

ThisPersonDoesNotExist, A Website That Uses AI To Make Fake Human Faces

https://thispersondoesnotexist.com/ the website has the capabilities of conjuring up an image using the GAN algorithm. The GAN works by splitting the ta...

https://thispersondoesnotexist.com/

How to add polish dictionary to postgres

PostgreSQL dictionary consists of 3 files: * lang.dict * lang.affix * lang.stop # Generating dictionary files 1. Download the most recent polish Isp...

How to include logo into devise messages

A quick guide how to include any file, in this case logo to devise messages

De Morgan's laws in Ruby

The negation of a disjunction is the conjunction of the negations and The negation of a conjunction is the disjunction of the negations.

Rails ERD diagram visualisation online

Manual: 1. Go to https://dbdiagram.io/d 2. Click *import* and choose *Import from Rails (schema.rb)* 3. Paste schema.rb content 4. voilĂ 

https://dbdiagram.io/d

How to run PostgreSQL if 'postmaster.pid' already exists

How to run PostgreSQL if it isn't starting because 'postmaster.pid' already exists

Multiline method memoization in ruby

Method memoization in ruby is easy when the method is one line long: ``` def something @something ||= # your calculations end ``` But when we hav...

RSpec rerun failures

How to configure RSpec to rerun failed specs only

Implement .node-version file in Bash & NVM

This snippet will allow you to automatically load node version stored in `.node-version` while changing current directory.

Ruby logger log levels

OK, it seems obvious but I always spend several minutes finding it. So I think it's a good idea to put it here.

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

https://github.com/presidentbeef/brakeman

Open Source GUI macOS archiver with support for 7-Zip

This program will help you compress and extract 7-Zips (and other popular archive formats) without using command line.

https://www.keka.io/en/

How to Address a Lady in a Business Letter

How to Address a Lady in a Business Letter? Here some advises. ## Not married `"Ms. #{last_name}"` or `"Miss #{last_name}"` ## Married `"Mrs. #{l...

Using comment notes in Rails

In your code: ```ruby # TODO: fix this ``` In your shell: ```bash % rake notes ``` ```text config/routes.rb: * [ 1] [TODO] fix this ```

Set the same password for all users in one query

Reset devise passwords quickly, even for thousands of users.

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

http://tabulator.info/

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

https://github.com/GoogleChrome/puppeteer

Fix bundler error "can't find gem bundler (>= 0.a) with executable bundle"

This error message seems to be related to network or Bundler issue, but it isn't - newer version of Bundler requires new version of RubyGems, which is not updated by default. Here, you'll see how to fix this issue.

jsPDF - JavaScript library for generating PDFs without using backend

Sometimes you wonder if there's a way to generate PDF without dealing with wk*topdf, puppeteer and other massive serverside tools - and there's one - jsPDF - which will generate a PDF for you in a moment, all client-side!

http://raw.githack.com/MrRio/jsPDF/master/