Skip to main content

Posts

Get search results for a specific location - using JS Bookmarklet

Drag these links to the bookmark bar: Ireland US UK  Australia Here are the next steps: 1. Enter the search query in URL field. Do not go to Google.com to search. It is important that the search url you have is of the format in point 2. Else this code won't work. This code was designed on the basis of how search urls are created in Chrome when you enter the search query in the URL field 2. So the search URL should be be of this format: https://www.google.com/search?q=vegetable+seeds&oq=vegeta&aqs=xyz&sourceid=chrome&ie=UTF-8 3. Click on the bookmark as per the location you want the search to happen in.

Installing Pyenv with ZSH

  This post is written assuming you are using OhMyZsh. Install Pyenv as per this:  https://realpython.com/intro-to-pyenv When I followed the instructions as they were in the guide above, I got the error: "command not found: pyenv". Zsh is not able to find pyenv even though it has been correctly installed. So we can tweak the steps a bit to adjust them to our Zsh shell. While installing, instead of the command   curl https://pyenv.run | bash , use the command   curl https://pyenv.run | zsh . This will install Pyenv. The guide asks you to add some lines of code in bashrc. We'll modify those lines and add them into our zshrc. Enter this command in terminal to be edit the zshrc:   sudo nano ~/.zshrc . Nano is a text editor in terminal that allows you to read and edit text files within the terminal. The command  sudo nano  will open the contents of zshrc inside the terminal just as any other text editor with GUI would. You can edit it the fil...

Redirect HTTP to HTTPS on Wordpress over Cloudflare

Found a pretty simple and to the point tutorial explaining how to redirect all HTTP requests to HTTPS on Wordpress ->  https://wp-mix.com/htaccess-redirect-http-to-https/ . Only these won't work if you're using Cloudflare as your server. If you add rules to your htaccess file to set up the redirect, you will see that the browser says "the website redirected too many times" or something like that. hmmm......... Few simple steps to add the redirect: (you don't need the htaccess): Head to Cloudflare Dashboard. Click on the website that needs the redirect. Go to SSL/TSL tab. Find the setting called "Automatic HTTPS Rewrites". If it is off and grey. Turn it on and it should turn [green]. Ok. Now we create a post. Can't. Because Wordpress fails to save any changes made in the editor. Wordpress says "updating failed you are probably offline". Why? In the General Settings of your Wordpress, the site url is still http://yourwebsite.com and not ht...