Posts

Showing posts from March, 2021

[How To] Install Free SSL Certificate for WordPress

Image
In this tutorial, I have installed a free SSL certificate from Let's Encrypt using the Certbot tool on Google Cloud Platform VM running Debian OS that hosts a WordPress site using Apache server. You can follow similar steps for other Cloud providers / OS distributions / CMS vendors / Web servers . Part-1: Configure Virtual Host for your domain on Apache cd /var/www/html wp option update home 'https://example.com' wp option update siteurl 'https://example.com' sudo nano /etc/apache2/sites-available/example.com.conf sudo apache2ctl configtest sudo a2ensite example.com sudo systemctl reload apache2

Random Number Generation in C++

Image
Code: // //   main.cpp //   VaultBox // //   Created by Devharsh Trivedi on 3/11/21. // #include <iostream> #include <iomanip> #include <string> #include <map> #include <random> #include <cmath> #include <vector> int main ( int argc, const char * argv[]) {     std :: random_device ranDev;     unsigned int num_ranDev = ranDev();     std :: cout << num_ranDev << std :: endl ;     std :: mt19937 mtGen(num_ranDev);     std :: vector < unsigned long > indexes( 10 );          iota (indexes. begin (), indexes. end (), 0 );     for ( int i= 0 ; i< 10 ; i++) {         std :: cout << indexes[i] << "\t" ;     }     std :: cout << std :: endl ;

[How To] Save as an unlocked PDF

Image
Steps to save a locked (password protected) PDF as an unlocked PDF: Download / Save / Copy the locked PDF to a folder Open Google Chrome Go to File Menu >> Open File >> Select your locked PDF Enter password Click on the Print button and select Save as a PDF The saved PDF will be unlocked This trick removes the open password from a PDF you can already open, by opening it in Google Chrome, entering the password, and then printing it back to a new PDF without protection. It only works when you know the password and are allowed to access the file, so it is for convenience, not for bypassing protection you are not entitled to remove.