November 26, 2018

Debugging Connectivity with tcpdump and Wireshark

This one is more of a note to myself and something I google every time I need to debug connectivity issues. When you want to get tcpdump capture in a file and then look at it in Wireshark run the following command on the host you are trying to connect from (and of course change some.host, XYZ and some.file with the values relevant to your case): sudo tcpdump -i any -n host some. Read more

November 23, 2018

ActiveRecord on a Leash

Rails’ ActiveRecord gives you great power and as we all know with such comes great responsibility. Just inheriting from ApplicationRecord unlocks a huge interface at your disposal and it is very easy to fell into a trap and find yourself using it from everywhere in your application - controllers, views and other models. Over the years I found there is one simple rule that helps me keep it all under control. Read more

Powered by Hugo & Kiss.