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.

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

Close a frozen ssh session

Properly close a frozen ssh session

How to deal with RSpec time precision error

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.

Move last commit to a feature branch

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

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.

How to simplify nested ifs

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

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

When to use let, let! and before in RSpec

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

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

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

Global payment/billing provider compatible with EU laws

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

https://paddle.com/

Generate fake screenshot mockups in minutes

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

https://mockuphone.com/

Pundit Decorator

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

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

TCP Server in Elixir

How to setup a simple, but robust TCP server in Elixir

Hello World in Slack

See the link for setup instructions. Then in ruby: ```ruby conn = Faraday.new(your_slack_webhook_url) conn.post do |req| req.headers['Content-Type'] ...

https://api.slack.com/tutorials/slack-apps-hello-world

Line icons based on Font Awesome

Replace Font Awesome with modern line icons with a single line of code.

https://icons8.com/line-awesome