Nil or Empty
Do you use statements like .. if !name.nil? && !name.empty? .. if params[:name] and !params[:name].empty? in your code? Using the blank? function of Rails, they can be simplified to .. if...
View ArticleCalling URL Shortener in Ruby
URL shortening is a technique where a provider makes a web page available under a very short URL in addition to the original address. Usually the services use some kind of hash function, and they are...
View ArticleCommand Line Tips and Tricks for Linux
Here are some useful command line tips and tricks for Linux/Unix systems. Indispensable are commands to find certain processes or files which match a specific name or keyword: $ ps ax | grep "tomcat" #...
View ArticleLocal vs. Remote Port Forwarding
Have you ever wondered what port forwarding is or what the difference between local and remote port forwarding is? Port forwarding is a way to forward or “tunnel” TCP traffic through SSH from one...
View Article