Changing Page Layout Doesn’t Reflect in PDF Printing

Blogs, Snippets
For quite some time it was strange to see some unnecessary margin borders in the PDF printing like below. A4 Page layout in Microsoft Word prints with some extra margins in the PDF The reason for this inappropriate printing is there is another layer of printer properties that control how the printer actually prints. In the printer settings, there is another page property which overrides the A4 page property that's set in MS-Word To fix the printer property (Microsoft Print to PDF printer in this case), go through the following in image below. Windows Settings → Printers & Scanners → Select Printer (Microsoft Print to PDF in this case) → Printing Preferences → Advanced → PaperSize → Set your required paper size that matches Page settings in MS-Word
Read More

Refreshing LinkedIn Post Thumbnails

Snippets
LinkedIn updates the images or text from the link for the first time and later when those links are updated with new images, it still doesn't update. To refresh it, use LinkedIn Post Inspector where you can drop your link to refresh. Now when you go back to your post, you may find its images and relevant text from the link is updated. I didn't have the dragon in the LinkedIn post before and after updating the blog with the dragon image, the post didn't update. After dropping the link in the post inspector, the dragon got updated. Image in a LinkedIn post updated after post inspector
Read More

Adding Alias Email to Gmail

Blogs, Snippets
We can send proxy emails from Gmail with other email addresses. You need to verify that another email address is your own in order to do this. I use this service to send email as if I'm sending from another Gmail itself. Recently Google has stopped the authentication of this kind of less-secure apps. However, there is another way to achieve it is via using the google app passwords that allow temporary password generation to connect from less-secure apps. Steps to add alias email in this new method Generate the password from your App PasswordsGo to Gmail settings --> Accounts and Imports --> Send Mail as: --> Add another email addressEnter your Name and Alias's Email address on the first pageEnter Google SMTP (smtp.gmail.com), Google ID, generated passwordVerify the code…
Read More

Renewing Bitnami’s Let’sEncrypt SSL Certificate

Blogs, Snippets
I use Bitnami wordpress and it comes with built in Let'sEncrypt SSL option for secured website. Previously I used to install this Let'sEncrypt independently, but in past few years this free SSL certificate comes preinstalled in Bitnami image. Recently, the certificate got expired and I found this thread with simple steps below to renew it Step 1: Stop the running script Run below command to stop the running script. sudo /opt/bitnami/ctlscript.sh stop I couldn't find the ./opt/ folder, so I went inside ./stack/ctlscript.sh Step 2: Update the certificate Run the below script with correct EMAIL-ADDRSS and DOMAIN (xyz.com) to which you need the certificate. sudo /opt/bitnami/letsencrypt/lego --tls --email="EMAIL-ADDRESS" --domains="DOMAIN" --path="/opt/bitnami/letsencrypt" renew --days 90 Step 3: Restart the script Finally start the server with the command below. sudo /opt/bitnami/ctlscript.sh start
Read More

Red arrow shortcut glyph on icon in Windows

Blogs, Snippets
After using the hardlink (instead of symbolic link in Link Shell Extension) I noticed this Red arrow shortcut glyph right on the source file from which I created the hardlink to other location. Strangely, Windows Explorer didn't show the hardlink indication however XYplorer showed this clearly. You may mistaken that red arrow is a shortcut but it's actually the source file. Red arrow glyph appearing on XYplorer but not in Window explorer for hardlinked source.
Read More

WP: Plugin download or update error

Snippets
There are many solutions around the web for this but for me, a temporary solution worked in a way when I made all of the root files read+write from /opt/ as below. Since I'm working on a separate copy of WP in my local drive, its not too risky to do this. $sudo chmod -R a+r+w opt/ And then removing the temporary directory (commenting out) mentioned in the wp-config.php file //define('WP_TEMP_DIR', '/opt/bitnami/apps/wordpress/tmp');//define('WP_TEMP_DIR', ABSPATH . 'wp-content/tmp/');
Read More

Arity & Currying

Blogs, Snippets
This is a series of blogs where I collect some interesting programming concepts, new things I learn Arity represents the number of arguments we pass to a function (or module). Say you may pass N args to a function. Currying is the process of reducing the number of arguments you pass to 1 but increase the number of functions to N. For Eg. To add three variables a, b and c you may write func like below function add (a,b,c){ return a+b+c; } add (45, 46, 47); Currying the same above function is then like below function add (a){ return function add (b){ return function add (c){ return a+b+c; }; }; } add (45) (46) (47); Notice how each function returns another function until the last function does the final…
Read More

My Favorite Linux Command line tools & Commands

Blogs, Snippets
Disk Space Analyzers df - command This command can quickly give a glance of how much space are consumed and left out on overall level. For example, below image shows that I have consumed 51% of my disc, so I have 49% left out. NCDU The below command worked for me in bitnami stack however there are also other commands for other OSes. The key feature about NCDU is we can analyze from the root folder and easily navigate with arrows and enter the key to see which is occupying more space. Remember to use Ctrl+Z to exit this at any time. sudo apt install ncdu Folder & File Permission Command: chmod Recursive: -RAll Read Write: a+r+w sudo chmod -R a+r+w /FOLDER/
Read More

Native Windows Tools which makes my life easier

Blogs, Snippets
Multi desktop (Ctrl + Win-key + Left or Right arrows) The icon next to Search in taskbar. Task View button on Windows Taskbar Usually I keep 2 desktops in my work PC where one is for my personal works, after all most of the cloud services keeps us busy personally in office ? Two desktops - My preference is to keep one for work and other for personal The shortcuts I use for easy switching the desktops are Cntl + Win-key + Left or Right arrows to switch to the desktop on left or rightTrackpad gesture 3 fingers swipe left or right. (I guess I configured it a while ago in windows settings.) Clipboard History (Win-key + V) Historical Paste This helps me a lot. Once you copy the text…
Read More

Car Driving License process Ireland

Blogs, Snippets
Obtaining a driving license in Ireland looks too cumbersome for beginners. And it's an especially lengthy process if you're from India. Good thing is that if you already have driving experience in India for more than 2 years, then you can reduce your license obtaining cost by about 200 euros with EDT Shortening. For all newcomers, I tried to grasp the steps below to achieve a driving license. Ireland Car Driving Lesson process steps Legends: ? Input to the step? Output from the step⌚ Time for the step? € Price for the step Step 1: Theory Test Practice Use theory-tester.com. No need for additional materials to practice.Complete all 900 questions on this website and pass at least 10 tests consistently.⌚ 10-20days? €Free? Your knowledge Step 2: Theory test booking ?…
Read More