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/

Rails migration decimal precision scale
Public

Rails migration decimal precision scale explained quasi visually ``` 123.45678912345 <- scale -> <- precision -> ```

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 remove deleted branch names from git suggestions?
Public

How to remove deleted branch names from git suggestions? It's as simple as that: ``` git fetch --prune --all ``` Or (thanks to @mus) you can add this...

Run RSpec without feature specs
Public

`rspec spec --tag ~@type:feature`

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.

How to install gem without documentation
Public

Hi, You've probably noticed that installation of gem documentation takes more time than installing gem itself. It can be annoying especially when you've alr...

How to drop a production database in Rails 5
Public

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

Close a frozen ssh session
Public

Properly close a frozen ssh session

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

How to use helper methods in mailer templates
Public

How to use helper methods in mailer templates? Instead of this "include YourHelper" use this "add_template_helper YourHelper" in YourMailer

How to set maximum backup size in time machine
Public

To set maximum backup size run this command in shell...

How to deal with RSpec time precision error
Public

In some cases, Ruby uses higher precision to represent time than the DB. When we compare a timestamp before and after saving to the DB it might not be equal.

How to detect time-overlapping-records in Postgres + Rails
Public

```ruby Model .where("TSRANGE(?, ?, '()') && TSRANGE(starts_at, ends_at, '()')", starts_at, ends_at) .where.not(id: record_id) .exists? ``` Bot...

Fix openssl error (macOS, ruby 2.3)
Public

So, you're trying to setup an Ruby 2.3.X-powered Rails app and it complains about openssl? Using a Mac? You're not the first. I've also been there. Let's get this nasty bug out of your way!

Rubular - a Ruby regular expressions editor
Public

Rubular is an online tool to check regular expressions written in Ruby.

http://rubular.com/

How to simplify nested ifs
Public

If you have `if`s nested in this way: ``` if a if b 1 else 2 end else 3 end ``` You can flatten and simplify them into this: ...

Debugging Turbolinks 5
Public

```javascript document.addEventListener('turbolinks:click', () => console.log('turbolinks:click')) document.addEventListener('turbolinks:before-visit', () ...

When to use let, let! and before in RSpec
Public

When to use let, let! and before in RSpec.

Make RSpec shared examples easier to understand with this one trick!
Public

This guy makes his shared examples easier to understand. Overpaid consultants hate him!

Free icon rainbow - big source of free icons
Public

Free icon rainbow - big source of free icons. Many sizes and 3 formats: png, jpg, svg

http://free-icon-rainbow.com/

Global payment/billing provider compatible with EU laws
Public

Recommended by https://pawelurbanek.com/profitable-slack-bot-rails

https://paddle.com/