Skip to main content


Batch Epoch time converter in java and shell wrapper

I had to create a sample script to convert epoch time to Human readable format.  (both ways) Also from Human readable time format to Epoch.  Input is a file with "Epoch" or "Human Readable"  format and the program will convert in the other format. This could be used for embedding into your application or for batch convert, please find my program in Java .... Afterwards, you can put this java file into a shell script if you want to automate your linux scripts Usage: <scriptname> <inputfiletimeformat> <input_file_name_full_path> ....

Clone multiple VM's and create multiple VM's using vagrant

Vagrant is an excellent tool for automation and doing proof of concepts (POC's). In many of the POC's you might need cluster and vagrant can do the clustering in matter of minutes by cloning an existing VM and then making into multiple Virtual machines Assumption You have basic idea of Linux & vagrant we are going to use centos/7 for vagrant guest The host is Fedora25/Redhat/CentOs system. Can be easily done for ubuntu as well Let's see the overall Summary of what we are doing to do create a working directory download and install virtualbox, then vagrant clean-up any unwanted boxes you have. putting the config file and provisioning Validating the nodes Creating a working Directory sudo su - mkdir /opt/vagrantOps cd /opt/vagrantOps Download and Install vbox, vagrant to your host (Fedora 25) vi /etc/yum.repos.d/virtualbox.repo  # with contents as per Virtualbox recommendation dnf install VirtualBox-5.1   # This will install vbox  f

De-monetization and impact on general population

Recently as part of Indian Governments demonetisation drive, there is a significant opinion divide on whom the real impact falls upon. This article is more of a data driven analysis based on key metrics Black Money - What is it? Who owns it? Wealth division - How wealth is divided and how it is stored Balance of power with Money Population Permanent vs temporary removal of high currency denominations Summary of Black Money In simple terms "black-money" means funds/wealth earned in day-to-day "transactions" which are NOT subjected to tax and therefore unaccounted. One of the biggest misconceptions for the word "black-money" is that it is some type of fake currency, but it is not.  Also other key word here is "transactions" which involves shift of funds/wealth. For instance, if a ordinary blue collar worker earns Rs500 and goes and buys milk from his friendly neighbour for Rs 100, then that IS black-money transaction of Rs100. In a mode

VMware to Virtualbox Migration

After updating my Fedora Kernel , VMware Workstation 12 stopped working. This moment I thought to switch back to Virtualbox as it has support for latest Kernels. There are pretty some good documentation on how to migrate from VMware to Virutalbox format You can find a good document on Migration Here  . In Summary the steps are Power off your guest which you are migrating Open command promt as an Adminstrator and Navigate to    C:\Program Files (x86)\VMware\VMware Player\OVFTool Run   ovftool <source.vmx> <output.ovf> eg  ovftool "C:\Users\diaryfolio\Virtual Machines\Windows 7 x64\Windows 7 x64.vmx" C:\Users\diaryfolio\Win7Export.ovf This would take about 15mins . So please be patient Once complete Import into your Virtualbox using "Import Appliance" Errors that might occur Error: "Failed to open disk” - This normally happens when the Guest VM is not properly shutdown or stopped Error while importing to Virtualbox  Failed t

Chromecast vs AppleTV vs Raspberry Pi vs Roku vs Others (2015)

Never waste your money on buying SMART TV's :)  But buy one of these to make your LED/LCD tv smart and control with your phone/home automation Let's compare between  Chromecast vs AppleTV vs Raspberry Pi vs Roku vs Others in 2015. Previous version comparison can be found here Chromecast 2 Google came with a new design for Chromecast 2, with a much better antenna (802.11ac) and perfect price ($35) Built in apps like HBO, Spotify, Youtube, Netflix (but all its competitors have these apps) Though aesthetic is much better, In my opinion it doesn't matter as it sits behind the Television Much improved casting from your phone, Laptop.. almost any devices with a cast option Also I liked that it doesn't have a remote, coz you can control from your phone Lacking power to play games Apple TV4 Coming with Top Specs and a cool Remote Control (Though I feel your iPhone is more than sufficient), Apple TV4 released in 2015-September boasts of (Price around $150

Encrypted Filesystem - Virtual filesystem with folder, file and content encryption

Linux is wonderful when it comes to security aspects and data protection. My challenge was Laptop having personal details in files and folders Have to encrypt these data so that if laptop is lost, the data shouldn't be replicated Have to use "git" to backup the data normally and version it Solution for Linux Design your folder/directory structure Ensure that all your personal files are well structured Ensure all files are put into a single directory/folder hierarchy  (eg "/home/myuser/personal/") Setting up encfs In Ubuntu, run  sudo apt-get install encfs Encrypted Directory and Mount location encDir="/home/diaryfolio/Docs/encr" # Where encrypted files are stored mntDir="/home/diaryfolio/Docs/mydocs" # Mount created # Create encrypted directory and mount directory encfs $encDir $mntDir # Press Enter which uses default encryption # Provide a strong password and REMEMBER it in future # C

OpenVPN configuration for CentOS

This article is specifically for PrivateInternetAccess on CentOS. As you might see there are no written packages/support for CentOS. I've followed a very good article from this link , but that was not enough as I had to tweak a lot afterwards. Just to write down the key points here Install OpenVPN using yum (enable EPEL beforehand)  sudo yum install openvpn Please follow all steps as per this article.  Hope you have copied all VPN files in /etc/openvpn and the credentials to /root/.pia When you start, VPN it throws an error [root@localhost openvpn]# systemctl start openvpn@server.service Job for openvpn@server.service failed. See 'systemctl status openvpn@server.service' and 'journalctl -xn' for details. This is because you need to ensure the files/configurations you put in /etc/openvpn needs to be " Set files with the openvpn_etc_t type " How to set files with a specific type Please follow below instructions sudo