How to install the free SSL certificate from “Let’s Encrypt” on NameCheap Shared Hosting Server without SSH access. [Working]

Do you want to make your website secure by enabling https:// by installing Free SSL certificate from “Let’s Encrypt” on NameCheap Shared Hosting Server without SSH access? If the answer is YES, then follow the steps below to achieve the same completely free.

In fact, this will work on any hosting server which allows installation of SSL certificates through cPanel.

All of the procedure needs to be done on your own desktop/laptop and generate the certificate. Once done, install the certificate on your hosting server through cpanel.

These two prerequisites must be set up on your desktop/laptop before starting the procedure:

openssl
python

Step 1: Create a directory and clone the “acme-nosudo” helper script.

Step 2: Generate an user account key to register with Let’s Encrypt.

Step 3: Generate the domain key and a certificate request which will get signed for free for your domain by Let’s Encrypt.

To know the path for the “openssl.cnf” configuration file, use the command ” openssl version -a “. This will show you the OPENSSLDIR: “/System/Library/OpenSSL”

Step 4: Run the script using python using your user account public key and the domain CSR.

Use the “–file-based” option to allow verify the challenge by creating and serving the desired file with desired content at desired URL on your server. This removes the need of having SSH access to your server.

During this process, the script asks you to run some manual commands, you need to run them in a separate terminal window. You need to keep the script open while you run them. Also, the challenge files can be created for verification using the “FileManager” at the desired directory.

Output:

Now, your certificate is signed and ready to be installed on your shared hosting server. Open the files “signed.crt” and “domain.key” with any text editor.

Step 5: Open the cPanel in the browser and install the certificate.

* Go to cPanel > Security > SSL/TLS and press on “Manage SSL Sites”.
* Select the domain you want to install the certificate. in my case it is “wpdelighter.com”
* In Certificate: (CRT) paste the content of the recently created “signed.crt”
* In Private Key: (KEY) paste the content of “domain.key”
* Press Autofill by Domain button, next to the domain selection drop-down.
* Press Install certificate.

If everything goes well, your let’s encrypt certificate is successfully installed on NameCheap shared hosting server.

Install Postgres database on Windows and allow password less access

Install Postgres Database on Windows and allow password less access for the database to be used in various applications.

  1. Install Postgres database on Windows machine by downloading the executable file from here: https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
  2. pgAdmin tool can be downloaded and setup on Windows machine to view and manage the databases and tables by downloading the executable file from here: https://www.pgadmin.org/download/ Make sure to check the Postgres version and compatible version of the pgAdmin tool.
  3. phpPgAdmin can be downloaded and setup on Apache server to manage the databases from a web based enviornment. http://phppgadmin.sourceforge.net/doku.php?id=download

Now, for applications running on private & internal LAN setup, a password less access to the the postgres database is required. To allow login into the database without a password, a simple modification to the pg_hba.conf file is required.

  1. Edit postgre configuration file: C:\Program Files\PostgreSQL\9.2\data\pg_hba.conf
  2. Change all configuration access to:
  3. Restart the postgres server. Go to Control Panel > Administrative Tools > Services > Restart the Postgres service.

How to get rid of the “searchguide.level3.com” hack ? [Solved]

Level3_Crap_Search_EngineSomedays back I noticed that when I type something into my browser it takes me to a different search engine called "searchguide.level3.com" which I don’t remember installing or set in the browser. I looked into my browser settings for anything suspicious but didn’t find any. Now, how to get rid of the “searchguide.level3.com” hack ?Level3_Hack_Redirecting

After searching and reading some forum posts, I finally found the cause and fixed it.

It happens because of faulty, free DNS servers. In my case, I was using Level3’s DNS servers (4.2.2.1 through 4.2.2.6) and it was hijacking the traffic. When something messy is entered directly into the URL of the browser, it redirects to Level3’s searching site.
Level3_Faulty_DNS

 

To fix the problem, simply search for a good DNS server and use that instead. Same thing will happen with most free DNS servers, however, I am OK with Google’s free DNS server.

Two of the best DNS servers that can be used instead.

  1. Google Public DNS8.8.8.8 and 8.8.4.4
  2. OpenDNS – 208.67.222.222 and 208.67.220.220

Hope this helps you solve your problem with the level3.com redirect.

How to stop outgoing emails being sent through postfix from your local machine in Mac OS X ?

stop-local-mails-from-postfix In latest versions of Mac OS X, by default the postfix is set to send emails from your local machine to outside world. This might cause you troubles if you are developing applications on your local machine and your application has email sending functionality to customers. Unfortunately if you have some customers’ email addresses in the database or in your code in the local setup, then test emails get delivered to them which is embarrassing. This happens even if you have not setup/integrated any 3rd party smtp services in your application.

To avoid this kind of situation, you can stop outgoing emails being sent through postfix from your local machine. Simply put the line below into the /private/etc/postfix/main.cf file in your Mac OS X.

default_transport = error:No outside emails.

The variable default_transport specifies which transport is used to deliver non-local mail (default is smtp). With this setting, any outgoing mail will bounce back with the error specified.

References:
http://www.postfix.org/postconf.5.html
http://postfix.cs.utah.edu/postconf.5.html

How to compare files on Mac OS X

Questions those come into mind when someone switches from Windows to Mac OS X for web development and wants to compare files:

  • Which editor has support for file diff or file compare functionalities on Mac OS X ?
  • Which is the best tool for file comparison while developing on Mac OS X ?
  • How to use FileDiff package on Sublime Text editor ?
  • How to use File Compare functionality in Text Wrangler in mac OS X ?

Answer/Solutions:
After developing 4 complete years on Windows, I have recently moved into a MacBook Air. During development, one thing I was missing was the “File Compare” plug-in on Notepad++ which I was using for a long time while on Windows. Even though NotePad++ doesn’t have a Mac version, there are some alternatives to that on Mac OS X. Two editors which I find very useful are Text Wrangler and Sublime Text 3.

 

File Compare on Text Wrangler:

  • Open both the files on the TextWrangler editor. Did I mention, this is a free editor and best for editing text based files.
  • Now select both the files in “Opened Documents” sidebar. [ ⌘ + Click ]
  • Right click on the selected files and click on “Compare”.

How to compare two files on textWranglerCompared Differences TextWrangler

 

File diff on Sublime Text 3:

  • Install “Package Control” for Sublime if you haven’t yet. How to do that ? https://sublime.wbond.net/installation
  • Now open the package installer and install “FileDiffs“.
  • To diff. two files, open those two files in Sublime Text 3. Right click on that file tab and click on “Diff Tab”.
  • Now you can use the diff. file generated (unified) to see changes between two files.

Diff with TabUnified Diff Result

 

To know how to integrate DiffMerge(an application to visually compare and merge files) with Sublime Text read: http://subharanjan.com/integrate-diffmerge-with-sublime-text-comparing-files/

How to integrate DiffMerge with Sublime Text for comparing files

DiffMerge Window

The other day, I was searching for some ways to compare two files(one from production and another from the local development of the same file) in Sublime Text. I found that there is no default tool to compare two files, thats why I installed “FileDiffs“, a package which provides the above needed functionality. What this tool does is: it provides you a result file which contains unified differences from both the compared files with + (Plus) & (Minus) symbols. Even though it serves the purpose, but for someone who has been using compare tools like WinMerge, or the color-full GUI in Notepad++ editor on Windows, the experience will be horrible.

However a cool feature of this “FileDiffs” package is that, it can integrate with any external diff. tools through command line. So, I installed “DiffMerge“, an free application to visually compare and merge files. Below is the set of settings that integrates “DiffMerge” with “FileDiffs” on “Sublime Text 3”.

How and where to apply these settings ?

  • Go to: Sublime Text –> Preferences –> Package Settings –> FileDiffs –> Settings – User
  • Copy & paste the above code in the FileDiffs.sublime-settings file.
  • Restart Sublime and see the file diffs visually in a nice graphical way. 🙂
how to apply settings for FileDiffs

how to apply settings for FileDiffs

 

Diff with Tab - FileDiffs on Sublime Text

Diff with Tab – FileDiffs on Sublime Text

 

DiffMerge Window

DiffMerge Window

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Update: “Compare Side-By-Side” package for Sublime Text can be used to side-by-side file comparison & difference in Sublime Text 2 / Sublime Text 3. This works great and easy to set up.

Get your website on https and get ranked higher on Google

In a recent blog, Google has announced that TLS, SSL enabled websites(https://) will be getting added advantages in SEO ranking. In order to make the Internet more safe and secure, Google has started using HTTPS as a ranking signal, that means if you site is HTTPS enabled you will get ranked higher. However they have also cleared that this ranking signal weighs less than signals like high-quality content etc.HTTPS as Google's ranking signal

Even though, some may think it as hypocritical of Google who has products which doesn’t follow HTTPS( like the BlogSpot), but Google has made this a part of SEO and may increase the weight of this ranking signal in near future. The whole purpose of this initiative is to keep everyone safe on the web. Website owners !! its time to switch from http to https. Encryption is going to be the key to SEO !! So, Get your website on https and get ranked higher on Google.

For more details visit the official Google Webmaster Central blog: http://googlewebmastercentral.blogspot.in/2014/08/https-as-ranking-signal.html

How to block the USSD notification/balance update messages on Android smart-phones ? [Solved]

Problem description:
In India, whatever internet plans you take for your smartphones, be it 3G, 2G Internet, GPRS etc. it always keeps randomly disconnecting. Sometimes it reconnects automatically, sometimes it takes a while. So, during this process we keep getting a remaining balance message or notification for the data usage which is nothing but a USSD.

What is USSD ?
USSD (Unstructured Supplementary Service Data) is a Global System for Mobile(GSM) communication technology that is used to send text between a mobile phone and an application program in the network. USSD is similar to Short Messaging Service (SMS), but,unlike SMS, USSD transactions occur during the session only. USSD is commonly used by prepaid GSM cellular phones to query the available balance.

These USSD messages for remaining balance and used balance are such that: these will asks the user to press the “OK” button and unless you press that, it stays like that on the screen and prevents you from performing any other task on the phone. It creates an overlay kind of screen which doesn’t allow the user to touch anything else unless you click ok button for each popup. Each time you send a sms, each time your internet gets disconnected etc. a notification popup will be displayed to be read by the user. These are so much in numbers that some one gets irritated.

There are times when you keep your smart-phone unused for more than one hour, and when you get a call, you have to press the “Ok” button 20-25 times on these popups to receive the call. Its really annoying !! Now, how to block those type of messages ? These frequent balance updates, data usage status are of no use/very less use.

Solution:
There is a nice app called Quiet Balance. Named as Balance Update / USSD blocker on Google Play. This app specializes in blocking USSD messages.

  • It provides ways you can block only specific type of messages. It has three types of matching methods for blocking USSD messages.
    1. Substring match: You may choose to block messages that contain a specific text.
    2. Keyword list: a list of keywords (comma separated keyword list)
    3. Regular expression: for advanced users by writing regular expression.
    When these conditions are matched, it triggers a block of that ussd message.
  • You can also choose to show the balance update message once per day (or week/month). This will cause the first balance update message to show up, and all other messages will be blocked for the rest of the day.
  • Last 25 messages are saved in the message log, along with indication if the message was blocked or allowed.

Go get the app and install on your Android phone and make it Smart 🙂 🙂
Get it on Google Play

 

 

Slide to see all the screen shots of the App:

Timthumb not showing images and throws “Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. ” error. [Solved]

timthumbRecently I faced a situation where the timthumb script was unable to crop the images and was throwing error messages. There are themes those still use timthumb even though its a bad practice to use in themes when we have already functions available in core WordPress. Anyway I had to fix the issue as I was not state to replace the timthumb functionality with core WordPress functions.

Here is the error message:

This issue occurs in several hosts, mainly the free hosts available these days. So, the trick is to find where the $docRoot variable was set and set it to my public_html folder manually in my home directory. In my file it was on line number 825. I did the following…

Obviously the /a9582221/ would be your username.

Where to make this changes ??
Search for the file timthumb.php and make the above changes. Thats it. The issue got resolved now.

How to disable responsiveness in the admin theme of WordPress 3.8

How to disable responsiveness in the admin theme of WordPress 3.8 ? How do I disable responsiveness of WP 3.8 admin ? Is there any way to disable responsiveness ? I want to disable the responsive hiding feature for tablets and mobile for the newly introduced WordPress 3.8 admin back end.

The question comes, Why do you need to disable the responsiveness ? So, here is a problem/situation that describes WHY ?
Stop Responsiveness WordPress 3.8
Problem/Situation:
I just updated my WordPress setup to WP 3.8 and most of my custom functionality are either inaccessible or very hard to manage on mobile devices. There are some things which doesn’t even get displayed on mobile devices. Earlier, I was able to manage my site’s functionality from backend on a mobile device too. Even though it was not responsive and not so cool. The problem is that I have installed some custom made plugins which were made keeping an eye on the old style admin theme and it provides me some custom made interface on the admin side. Obviously these were not made responsive. Now, with this new WordPress admin theme, all those custom interfaces are completely messed up. So I have two options:

  • Either revert back to WP 3.6/3.7 ( but I really like the look and feel of the new WP 3.8 theme yet I don’t need the responsive property 🙁 )
  • Or make changes to all the custom made screens/interfaces in the admin side to be responsive. ( I can do that, but it would take much time to accomplish. Also, does it worth doing just for the sake of a new responsive admin theme in mobile devices ? 😕 )

How can I keep the new, super cool, awesome theme of WordPress 3.8 yet disable responsiveness of the theme ? ❓ ❓ ❓

Solution:
I tried to search for any solution but didn’t find any. Here is a quick solution that I have done to get back my custom functionality in the admin screen.

  1. Create a plugin to add custom code.
  2. Take the css file that is responsible for the wp-admin side styling and responsiveness. Make changes to remove the responsive property out of it. Basically remove all the media queries written for mobile devices.
  3. De-register the default admin styling that comes with WordPress.
  4. Register and enqueue the changed css file again to apply the custom styling.

Download the code as a plugin: disable-responsive-admin

Code for disabling responsiveness:

Download the above code as a plugin: Plugin to disable responsiveness in WP 3.8 admin

Note: This never a proper/good way of doing changes to admin styling. Still, as I have upgraded and would like to keep the theme and remove responsiveness, I am using the above quick solution. If you are facing the same problem as I am, use the above procedure or download and install the plugin. You can modify the css file present inside the plugin directory too. Caution: Use with your own risk. 🙂 🙂