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

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/

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

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

TCP Server in Elixir
Public

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

Example tmux script for Rails
Public

Shell script that will start a tmux session with Rails console and server in side panes

Use React.Fragment to avoid creating useless divs
Public

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

Pundit Decorator
Public

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

Close a frozen ssh session
Public

Properly close a frozen ssh session

Style PDFs using metric units in CSS with wicked pdf
Public

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

Line icons based on Font Awesome
Public

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

https://icons8.com/line-awesome

Multiline method memoization in ruby
Public

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

Global payment/billing provider compatible with EU laws
Public

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

https://paddle.com/

Hello World in Slack
Public

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

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!

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

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

Debugging Turbolinks 5
Public

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