React hook for JavaScript debounce
Create a JavaScript Debounce hook that works with React state.
Schedule unique jobs in Sidekiq
In one of the projects I work, there was a requirement to schedule only one job for a record at a time. If someone wants to schedule another one for the same record, the system should clear the old schedule for it and schedule the new one.
Git - delete local branches
After working on a project for a while, we normally end up having too many branches locally.
OpenSSL connection error with Redis6 on heroku
OpenSSL::SSL::SSLError (SSL_connect returned=1 errno=0 state=error: certificate verify failed (self signed certificate in certificate chain))
React state validation hook using Yup
Struct class in Ruby
Struct
is a collection of attributes with accessor methods,
without having to write the class explicitly.
Dig method in Ruby
#dig
method was added in Ruby 2.3 to Array
and Hash
classes.
It makes digging the Array and Hash easy while making the code readable.
Zero-Downtime migrations in Rails
Often, we rename a column and deploy to find out the Honeybadger screaming at us with the errors accessing column with the old name!
Hash With Indifferent Access in Rails
When I found out how the params
could be accessed using both symbol
and string
as keys,
I dived deep to figure out about ActiveSupport::HashWithIndifferentAccess
class in Rails.
Comparable module in Ruby
Ruby’s
Comparable
module is used when implementing class objects needs to be ordered or compared.