Two icons in dock?

Some time dock starts showing two icons of an app in dock, that is because dock failed to match the application window manager name (class) with the opened app. For example MongoDB Compass showing dual/two icons on the docky. To see what class name app is actually using we need to use xprop which is […]

Grub Dual Boot in UEFI Windows 10

If you are booting in EUFI mode you need to install grub in UEFI mode. First, install the packages grub and efibootmgr GRUB is the bootloader and efibootmgr is used by the GRUB installation script to write boot entries for efi systems. Mount the efi file system partition, for example it is /dev/sda2 Install Grub If you are having Windows as dual […]

Auto switching wireless profiles in Arch Linux

Please follow steps below to auto switch your wireless network profiles. This is useful when you frequently switch between your wireless networks i.e home and office. 1. Install wpa_actiond, dialog and wpa_supplicant 2. Create profile using wifi-menu   It will display a wifi network selection, choose your network and provide password. Save the profile. Repeat […]

fatal: refusing to merge unrelated histories

When you already have some thing in your git repo for example you created a git repo on github with readme file and then tried to push your local code first time to that github repo. So github repo already has a commit, it will force you to first pull it to your local code […]

Passing arguments to cron and receive in php

Setting up cron Crons can pass parameters or arguments to scripts as well for example you have example.php set as cron like below Now if you want to pass parameters to example.php in cron you can do it as follow by using key value pairs If you want to send arguments without keys you can […]

How to set php script to cronjob

Cron is a task scheduler which can execute a task on certain intervals, you can add php script to cron to run it on certain time intervals. For example you want to delete temporary files after every 14 days, you write a script to delete temporary files and add that script to cron. How to […]

How to secure you Magento installation from possible hacks

Magento is widely used as a powerful e-commerce platform, hence it is popular and widely used there are more hacks and malware created from outside world to attack magento to steal information or redirecting users to advertisement pages. Here I will tell you how you can protect your magento installation files, there are other steps […]

Linux: Add permission only on directory or files

That’s why I love linux, it has great deep level control over system, you can set permissions on just directories and skip files or just on files and skip directories. Isn’t that wonderful? In a web environment you don’t want to make core files writable but you want to have permissions for execute and read, […]