Blog

No library HTML+CSS+JS Confirm Dialog

Made an HTML+CSS+JS (JavaScript) confirm dialog today without using any external library. No jQuery!

HTML:

<a class="button button-success btn-show-confirm">Show confirm</a>
<div class="confirm dummy">
  <div class="contents">
    <div class="title">Confirm Message</div>
    <div class="message">Are you sure?</div>
    <div class="buttons">
      <a class="button button-success btn-yes">Yes</a>
      <a class="button 
Blog

CSS Disable Checbox

Today, I needed to disable checkbox using CSS only without any HTML attribute.
Here is the code:

HTML:

<input type="checkbox" checked="checked" />
<!-- using opacity -->
<input type="checkbox" checked="checked" />
<!-- using layer -->
<input type="checkbox" checked="checked" />

CSS:

input[type="checkbox"]:nth-child(2) 
Blog

How to backup whole Linux server?

You can backup a whole VPS using the `rsync` command below.

rsync -avP --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/media/*","/lost+found"} / /mnt/hdd/encrypted/vps-server-backup/

You can also backup to other server.

rsync -avP --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/media/*","/lost+found"} / OTHER_SERVER_HERE:/mnt/hdd/encrypted/vps-server-backup/

You will first need to configure OTHER_SERVER_HERE in your ssh config file. …

Blog

WordPress Admin was not showing add/deactivate/delete plugin options

A strange thing happened today.
I wanted to manage plugins for one of my WordPress websites.
But, I could not see any add/deactivate/delete plugin options on the Plugins page.

Then I realised that I had WordPress Multi-Sites enabled as I …

Blog

SimplePromise – A simple javascript promise with approve, reject, cancel & progress features

Needed a cancelable promise for my project. Also, needed to solve multiple resolve & reject problem done by original Promise because I was making a lot of asynchronous requests and gathering all data together.

Here is SimplePromise which works same …