Posts

How to merge multiple pdf files

Today, I merged my brother's coverletter and resume into one single pdf file. How did I merge two pdfs? Hmmm.... Did I buy Adobe Acrobat professional.........Oh no!!!!. I am Linux user. I can do magic. Sorry Windows users..... I am using Linux mint. I have pdftk tool. Type the following command in the terminal to install pdftk: $ sudo apt-get install pdftk Firstly, I renamed my brother's coverletter from "lastname-firstname-coverletter.pdf" to "lastname-firstname-1.pdf" and resume from "lastname-firstname-resume.pdf" to "lastname-firstname-2.pdf" Finally, I ran the following command in the terminal pdftk lastname-firstname-*.pdf cat output lastname-firstname-coverletter_resume.pdf

YAML tutorial links

This is a quick YAML tutorial: https://learnxinyminutes.com/docs/yaml/

MongoDB sharding the simple way

Here, I will discuss how to create mongo shard in the single machine (locally) for dev environment. My OS is Linux Mint and MongoDB version is 4+. Install MongoDB: I downloaded mongodb tar files and extracted it to the /opt/mongo/. Create database directory: $mkdir -p /opt/mongo_db/shard_db I like /opt directory very much, if you do not like create your database directory in /opt, please create it in your desire location. I dislike pointless argument. To create shard you must have a plan to organize your shard clusters. In this example, I will create 3 shard each shard will have 2 replicate sets and 1 config server with 2 replicate sets and 1 mongos to connect shard cluster via config server 1) Shard servers/clusters   1.1) Create sdb directory inside the shard_db/ directory:          $mkdir sdb     1.2) Inside sdb/ directory we are going to create 6 directories as I mentioned earlier that I am going to create 3 shard with 2 re...

How to copy directory structure without copying contents of the directory

Few days ago, I have to download Spring Framework latest stable jars. There is no single zip file which contains all the jars of Spring Framework. So, I have to create the directory for specific jar and download it.  I had older version of Spring Framework directory which contains folder for specific jar file. I do not want copy the content inside the directory just directory structure. Therefore, I issued the following command. find . -type d >dirs.txt xargs mkdir -p

How to install Homebrew in Mac OSX (High Sierra)

Homebrew setup guide This guide describes how to install Homebrew and few ferequently used Homebrew commands. Using Homebrew you can install software very easily. It is like linux "yum" command. Install Homebrew (The missing package manager for OS X): $/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" $brew doctor   (You should see "Your system is ready to brew." on the console output. Do not move forward unless you see this.) Common commands: Check version of brew:    $brew --version Search Homebrew repo: $brew search %app name% (i.e: I want to check "wget" is available or not. $brew search wget) Check app information:    $brew info %app name% (i.e: $brew info wget) Install software package: $brew install %app name% (brew install tree) Uninstall software package: $brew uninstall %app name% (brew uninstall tree) Check installed packages in your system: $brew list Ins...

Programmer's PC Specifications

When I was studying at university, I had a dream that I would built a PC by myself. I was waiting for the opportunity to build a PC. Many years later, I have got the opportunity to build my own PC. It was very pleasing event. Someone wants to argue in this day nobody build PC unless it is a gaming rig. Actually, I do not want to argue about it. I just want to say, build by own hand give me inner peace. Today, I would like to share few thought about programmer's PC. As a programmer, I have few preference. Before building a PC you need money, without money you cannot buy parts. As a Java web application developer, I use Spring framework, JEE libraries, database system, Jetty, Nginx and Eclipse IDE every day. I am not building gaming rig. If you go to the Youtube , you will see most of the people demonstrating about gaming rigs. After watching almost all the "PC building guide for beginners", I have got feeling that everybody use PC for gaming, at present. Hello, I am a...

exFAT support in CentOS 7

exFat support in CentOS 7: "sudo yum install exfat-utils fuse-exfat"