Using comment notes in Rails
Public

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

Move last commit to a feature branch
Public

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

RSpec rerun failures
Public

How to configure RSpec to rerun failed specs only

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

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

Disable `Missing frozen string literal comment.` Rubocop warning
Public

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
Public

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

https://mockuphone.com/

Launching subprocessess in Ruby
Public

This graph shows several ways to launch subprocess in Ruby.

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

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

How to include logo into devise messages
Public

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

Basic requirements for Facebook Cover Video
Public

Essential requirements for Facebook Cover Video: Recommended resolution: 820 x 462 px Duration: 20 - 90 seconds Filetype: mp4 Remember top and bottom...

https://www.kapwing.com/resources/how-to-make-a-facebook-cover-video/

How to add polish dictionary to postgres
Public

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

jsPDF - JavaScript library for generating PDFs without using backend
Public

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/

How to hold Mac from going into sleep?
Public

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
Public

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/

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

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.

Fix libv8 / therubyracer installing error
Public

Sometimes, something unexpected grabs our attention - libv8 or therubyracer extensions installation error - here's how to get rid of them!

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

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

Prettier raw SQL in ruby
Public

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

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

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

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

Define routes for external links in rails
Public

You can define external urls in routes.rb instead of creating helpers manually

https://guides.rubyonrails.org/routing.html#direct-routes

Set the same password for all users in one query
Public

Reset devise passwords quickly, even for thousands of users.

How to show macOS notification from Bash?
Public

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.

NazwaPL SSL certificate chain
Public

Here you can find SSL certificates needed to create SSL chain if you use certificate from NazwaPL.