Show newer

Am I even developing in Ruby any more?

items.each_cons(2).with_index do |(previous_item, current_item), i|

Setting macOS App Shortcuts on the command line for your setup scripts:

defaults write .preview NSUserKeyEquivalents \
'{ "Adjust Size..." = "@~s"; "Hide Sidebar" = "@1"; Thumbnails = "@2"; }'

Did you know that

User.where(id: [])

actually performs a useless ActiveRecord query?

For more nice tidbits, I recommend watching "Cache is King: Get the Most Bang for Your Buck From Ruby" when it gets processed in

I thought I knew mostly everything about Vim, but today I was proven wrong:

:set wrap!

will toggle between wrap and nowrap (or whatever option you set)

Mastodon 2.6 is out and running on this instance. ๐Ÿ‘

I have added the following to verify my website head:

<link href="" rel="me">

In order to get this vanity green verification mark:


50_000.times { |i| $redis.incr("abc:#{i}") }
# => about 8 seconds

$redis.pipelined do
50_000.times { |i| $redis.incr("abc:#{i}") }
# => about 0.9 seconds

Convert a string to ASCII and remove any resulting awkward spaces:

s.encode('ASCII', invalid: :replace, undef: :replace, replace: '').squeeze(' ').strip

Aphex Twin put all his music on his website for people to listen for free:

Happy coding

Latest version of Ruby is 2.5.1...
Latest version of Rails is 5.2.1...

The Illuminati exist! This is proof!

Upgrading an app to Rails 5.2. New schema version formatting will make conflicts easier to read and resolve. *Tears of joy*

The Illustrated Children's Guide to Kubernetes, aka "get your Kubernetes Official Certificationโ„ข in 8 minutes":

I โ™ฅ๏ธ the Insomnia client. It's like Postman, but it also works for GraphQL.

Just bought tickets to my first . Excited! See you in 1 month in LA. โœˆ๏ธโ˜€๏ธ :ruby:

Turn children into orphans:


# => "๐Ÿ‘งโ€๐Ÿ‘ฆ"

Whenever I create a migration in Rails, this is what I use to run it:

alias mi='rake db:migrate db:rollback && rake db:migrate && RAILS_ENV=test rake db:migrate'

Ensures that your migration is reversible + migrates your dev and test DB in one go

Show older

A Mastodon instance for Rubyists & friends