Tips
Getting Ready For The Leap Second
Tips
June 28, 2015 | COMMENTS

As you probably know, on Tuesday June 30th a leap second will be added and the day will last 86,401 seconds. Considering the Leap Second Bug which happened in 2012, this event could be quite impacting for the internet and any computer systems. What does it mean and what should you know to be better prepared for this event?

In the end, there’s only one solution: Hitting the Earth with asteroids.
Continue Reading
Advanced Math Calculation in Bash using GNU bc
Shell Tips
January 1, 2015 | COMMENTS

In this post, we will cover how to do advanced arithmetic and write your own functions with GNU bc.

If you are looking at doing basic arithmetic in a bash shell or using bc, you should take a look at my older post about Performing Math Calculation in Bash.

Continue Reading
disown a running shell process and reattach it to a new screen
Shell Tips
September 9, 2014 | COMMENTS

Stop worrying about your VPN connection dropping and your remote job to get kill. You can work on a remote server from your laptop or desktop in a safe and controlled way by detaching your screen session and reattaching later.

Continue Reading
sudo: sorry, you must have a tty to run sudo
Shell Tips
September 8, 2014 | COMMENTS

You just have configured your sudoers to execute some command without password from a ssh connection. Bummer, you just got an error:

sudo: sorry, you must have a tty to run sudo

No panic, there is an easy fix!

Continue Reading
redirecting a stdout to a file using sudo and tee
Shell Tips
September 8, 2014 | COMMENTS

When you attempt to modify a file without write permission on it, you will end-up with a permission denied error.

$ touch donottouch.txt && sudo chown root donottouch.txt
$ cat donottouch.txt
$ echo "change stuff" > donottouch.txt
-bash: donottouch.txt: Permission denied

Using sudo before echo won't help since the redirection will still apply within your shell environment. Here is few approaches to this problem.

Continue Reading