This is a quick post. Working on a project, I just wondered if I could delete files in terminal so that they moved to Trash so that I could recover them. I am on Mac btw. It turns out that you can install a utility with Homebrew for just that functionality. $> brew install trash […]Read more "Move files to Trash from Terminal"
I have been wanting to do this for some time now. You can either do this easy way with Homebrew or take your time to get the code from Github and load it manually. Install the following cask using Homebrew brew cask install qlstephen or brew cask install quicklook-json (view json highlighted with colors) or […]Read more "Mac – Use Finder Quicklook to view JSON files"
This bugged me for some time before I finally looked for the solution. Turns out it was pretty simple. Before pasting the text, do the following set :paste Once you have pasted your text set :nopaste I know this can get inconvenient if you do a lot of copy pasting (which probably you shouldn’t). This […]Read more "Disable auto indent feature when pasting text in vim"
awesome_print pretty prints/formats Ruby objects. This post focuses on having awesome_print enabled in the rails console without changing/updating the Gemfile. This way it is available in all Rails applications and consoles. You can always add the gem to the Gemfile and have this working for that specific rails application. gem ‘awesome_print’, :require => ‘ap’ To […]Read more "Set up awesome_print as default Rails console formatter"
Today I found a really helpful and intuitive resource that you can use to understand crontab syntax. This site clearly tells you when a particular command set in cron will be executed. https://crontab.guru/ Really handy! Isn’t it! Caio!Read more "Crontab – Understand cron syntax with this Interactive resource"
# Install go/golang with homebrew brew install go –cross-compile-common # Set following env variables in ~/.bashrc or ~/.zshrc export GOPATH=$HOME/golang export GOROOT=/usr/local/opt/go/libexec export GOBIN=$GOPATH/bin export PATH=$PATH:$GOPATH export PATH=$PATH:$GOROOT/binRead more "Mac OS – Install Golang with Homebrew"