Quantcast
Channel: 4 Lines of Code » tips
Browsing latest articles
Browse All 4 View Live

Image may be NSFW.
Clik here to view.

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 Article



Image may be NSFW.
Clik here to view.

Calling 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 Article

Image may be NSFW.
Clik here to view.

Command 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 Article

Image may be NSFW.
Clik here to view.

Local 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
Browsing latest articles
Browse All 4 View Live


Latest Images