Posts

[How To] Save Space on Google Photos

Image
Google Photos is a photo-sharing and storage service developed by Google . It was announced in May 2015 and separated from Google+, the company's former social network. In its free tier, Google Photos stores unlimited photos and videos up to 16 megapixels and 1080p resolution, respectively (anything larger gets down-scaled to these sizes). This free tier will end on June 1, 2021 . Photos and videos uploaded after that date get counted towards the 15 GB free quota shared across the user's Google services . There are subscriptions offered for users wanting to store their photos and videos at their "original" quality and requiring more storage than the 15 GB offered free. Storage (GB) Per Month (USD) Annual (USD) 15 0 0 100 1.99 19.99 200 2.99 29.99 2000 9.99 99.99 You can check out how much storage you are using across Google services out of your quota of free 15 GB. Go to Google Drive and check the storage bar on the left side. Or you can click on the Setting butto...

[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.

setsockopt: Protocol not available [Solved]

Image
Problem code: if (setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR | SO_REUSEPORT , &opt, sizeof(opt)))  {  perror("setsockopt");  exit(EXIT_FAILURE);  } Solution: if (setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR , &opt, sizeof(opt)))  {  perror("setsockopt");  exit(EXIT_FAILURE);  } Ref.:  https://stackoverflow.com/a/59807281/4064166 This error appears when a socket option is not supported on the current platform. Here the combination of SO_REUSEADDR and SO_REUSEPORT fails because SO_REUSEPORT is unavailable, so the call returns Protocol not available. Setting SO_REUSEADDR on its own fixes it, which is widely supported and enough for the common case of rebinding a recently used address. SO_REUSEPORT behaves differently across operating systems and is not always present.

[How To] Fix "Waiting to Upload" in iCloud Drive

Image
1. Check if you have enough free storage on iCloud 2. Go to Settings (iOS / iPadOS) or System Preferences (macOS) >> iCloud >> Sign Out 3. Wait for a minute or two after you have successfully logged out 4. Log in to iCloud again 5. Go to iCloud settings and >> iCloud Drive >> Options... >> select the checkbox for "Desktop & Documents Folder" >> Done

Best tablets to buy in 2021

Image
iPad Air 2020 256 GB -  https://amzn.to/2OVg49n Brand - Apple Storage - 256 GB Display - 10.9" Resolution - 2360 x 1640 Operating System - iPadOS 14 stylus pen for iPad with palm rejection -  https://amzn.to/3aEluxP iPad A ir 4th generation keyboard case -  https://amzn.to/3kbOT5D iPad Air glass screen protector -  https://amzn.to/3aG5xY1