Encode or Decode base64 from the Command Line

If you have ever needed to quickly decode or encode base64, Linux has a command line utility called base64 that works great. I’ll show you how it works!


To encode text to base64, use the following syntax:

$ echo -n 'codediary.net rocks' | base64
Y29kZWRpYXJ5Lm5ldCByb2Nrcw==

To decode, use base64 -d. To decode base64, use a syntax like the following:

$ echo -n Y29kZWRpYXJ5Lm5ldCByb2Nrcw== | base64 -d
codediary.net rocks

Note: if on OS X, use capital D:

echo -nY29kZWRpYXJ5Lm5ldCByb2Nrcw== | base64 -D

Installing Oracle XE with Docker

Nicest way to install Oracle XE on any operating system (for development) is Docker. Docker is an application container for Mac, Linux and Windows. It is based on LXC and gives you the ability to package complete application including their dependencies to a self-containing file (called an image). These images can be exchanged and run on every Linux machine where Docker is installed! Awesome!

Continue reading