Turning mediocre dating matches into gold!

Photo by Yoann Boyer on Unsplash

Preposterously frustrating is an understatement when it comes to describing my online dating experience. Apparently, this is a common feeling among online daters, especially people of the male persuasion.

The Response

Out of 100 initial messages sent, not unusual to only receive 5 responses. 1 or 2 of those might lead to texting or phone call. And only 20% of those would result in a date.

Now after all that hard work, we were still not guaranteed a good match. In fact, the majority of dates would turn into dead ends. Either the other person was totally doped up during the process of creating the online profile, hadn’t taken photographs for the last decade or so, or had the personality of a train wreck.

Despite the abysmal odds, occasionally I would encounter a diamond. Unfortunately, these still turned out to be dead ends. Either there was no mutual chemistry, or the chemistry was one-sided. More often than not, the girls would turn defensive and sever all ties. Can’t say I blame them, some guys just would not give up, and that gave rise to said responses.

Man thinking
Photo by Lee Weng on Unsplash

That got me thinking 🤔, was there be a better way?

The Abundance Mindset

To begin with, there are 3.8 billion females in the world. If only 0.0001% is a good match for me (taking into consideration all the important factors such as age, personality, common interest, preference, chemistry etc.), we are looking at more than 3,800.

There is this concept of 6 degrees of separation. It states that every human being on earth is connected to each other in no more than 6 steps.

What I had been doing all along was trying to find my match in the first degree, and my counterpart was doing the same. What if we make use of the power of social circles and reach beyond the first degree?

A Different Approach

💎 The solution is this, rather than severing the tie with a diamond, let’s become friends. The agreement is we no longer view each other as potential mates, thus removing the awkwardness of unwanted attention.

The fact that the girl went out with me in the first place implied I possessed some of the qualities she admired. Birds of a feather flock together. The chance is high that the guys I know possess qualities she admires, and vice versa.

We can subsequently set up double dates. I invite one of my guy friends, she invites one of her girl friends. This allows us to reach beyond the first into the second degree of separation.

Additional Benefits

  • The double date situation is less nerve-racking for all parties involved, especially true for inexperienced daters.
  • I would have told my guy friend about the attractive qualities of his date and vice versa. Starting on a stronger footing.
  • I can form the same friendship with my new date if we are not a good match. Thus reaching the third degree and beyond.
  • This is not limited to double dates, can be a group outing. Once again achieving the result of reaching beyond the first degree.
  • When I encounter an unusual, and usually unexplained, scenario with a girl, I can now seek advice from a girl in the friend zone instead of another guy, who often has absolutely no idea how females think. In fact, I recently helped out a female friend in that type of situation, which eased her concern about the action, or in this particular case inaction, of the guy she was going to meet.
  • Once my guy friends start forming their own social circles, they should start inviting me out on double dates.

Conclusion

Dating in the modern era has changed dramatically over the last 5 to 10 years, especially with the prevalence of online dating applications. Relationships are formed and discarded without a second thought to the negative effect on one’s psyche and behavior.

My sincere wish is for this concept to take hold, and we have a lot less reason to practice the dark art of ghosting. That should generate less resentment in the long run, and bring us closer to world peace 😉.

If you receive positive result after applying this technique, please share your story with me. Love to hear from you.

How to create user snippet (code template) in Visual Studio Code

User snippets are templates that make it easier to enter repeating code patterns in Visual Studio Code.

For example, in a .html document, when you type h1 and press ENTER, it will be replaced by <h1></h1> automatically.

Follow the instructions below to define your own user snippet.

  1. Under the File menu, select Preferences, then User Snippets

    Visual Studio Code User SnippetsVisual Studio Code User Snippets
  2. Select or type in the file type you wish to add the snippet to

    Visual Studio Code User Snippets File TypeVisual Studio Code User Snippets File Type
  3. Enter title of snippet, prefix, body and description. Below is an example of adding stg as a shortcut to <strong></strong>.

        {
          "strong tag": {
            "prefix": "stg",
            "body": [
              "<strong>${1}</strong>"
            ],
            "description": "<strong></strong>"
          }
        }
        
  4. The settings above are stored in a file on your computer, which can be copied to another computer if desired.

    If you do not know where the file is located, enable full path name and the path will be shown in the title bar of Visual Studio Code.

Sample User Snippets

t-html for .html file

t-vue for .vue file

For detail information on how to configure user snippet, here is the link to the official Visual Studio Code site on ‘Creating your own Snippets’.

Cleaner Code: Keep Code Left 🖌️

Attended a great meetup recently about a coding philosophy called Keep Code Left, presented by Michael Andrew from Sage.

Thought it might be a good idea to make a record of what I have learned. Hopefully it may benefit others who may not have encountered this technique before.

In Keeping Code Left, the goals are:

  • Filter out unimportant cases as early as possible
  • Main body of a function should not be indented
  • Avoid deeply nested code blocks if possible
  • The useful result should be at the end of the function

Examples:

• Filter out unimportant cases as early as possible
• Main body of a function should not be indented

Bad:
function process(a) {
  if (a) {
    doSomething(a);
    doSomeOtherThing(a);
    doOneLastThing(a);
  } else {
    throw "Missing argument!";
  }
}

Good:
function process(a) {
  if (a == undefined)
    throw "Missing argument!";

  doSomething(a);
  doSomeOtherThing(a);
  doOneLastThing(a);
}

• The useful result should be at the end of the function

Bad:
function diff(a, b) {
  if (a > 0 && b >= a) {
    return b - a;
  } else if (a <= 0) {
    logError('a less than 0');
    return null;
  } else {
    logError('b less than a');
    return null;
  }
}

Good:
function diff(a, b) {
  if (a <= 0) {
    logError('a less than 0');
    return null;
  }

  if (b < a) {
    logError('b less than a');
    return null;
  }

  return b - a;
}

WordPress migration from Arvixe to MochaHost

Below are some tips on migrating WordPress from one web host to another. My experience is with migrating from Arvixe to MochaHost, but the steps mentioned should be similar on other shared web hosting accounts.

Steps:

Back up WordPress database

  • On cPanel, click on phpMyAdmin
  • Select the WordPress database, then Export
  • Select check box Custom – display all possible options
  • Make sure all tables are selected
  • Make sure check box Save output to a file is checked
  • Scroll to the bottom and click on Go
  • A .sql file will be produced, save it to your hard drive

WordPress database back upWordPress database back up

Back up WordPress files

  • Connect via ftp to your web host
  • Copy all WordPress files to your local drive
  • If you are not sure where the WordPress files are located, access the WordPress icon in cPanel, click on Edit, the pencil icon, of your WordPress installation.
  • The Directory field shows where the WordPress files are located

WordPress File LocationWordPress File Location

Install a new WordPress instance on the new web host

Note: If this step is skipped and the files are copied to the new server directly, the backup feature of Softaculous will not be available.

  • On cPanel of the new web host, click on WordPress. This should be in the SOFTACULOUS APPS INSTALLER section.
  • Click on Install Now
  • Fill in the appropriate fields.
  • It is recommended to keep Table Prefix the same as the old database to avoid having to rename tables
  • Make a record of Database Name

WordPress Database Name and Table PrefixWordPress Database Name and Table Prefix

Copy old WordPress files to new web host

  • Connect via ftp to your new web host
  • Rename the WordPress folder on new web host, e.g. public_html to public_html__backup
  • Create a folder with the same name as the WordPress folder before it was renamed, e.g. public_html
  • Copy WordPress files from the old web host to this folder

Set up WordPress database on new web host

  • On cPanel of the new web host, click on phpMyAdmin
  • Select the WordPress database, then Operations
  • Copy the database for backup and comparison purpose
  • Click on Import, select the .sql file created earlier, click Go to import the database

Configuration: wp-config.php

  • On cPanel of the new web host, click on File Manager
  • Select the WordPress folder, e.g. public_html
  • Open file wp-config.php
  • Change the following settings to match the new server, replace ??? with values from new web host
    (Note: values can be found from the wp-config.php file in the backup folder, e.g. public_html__backup)

That should be it, WordPress is now successfully transferred to the new web host.

How to show full file path in Visual Studio Code

  1. Select File > Preference > Settings

    Visual Studio Code SettingsVisual Studio Code Settings
  2. Click on WORKSPACE SETTINGS

    Visual Studio Code Workspace SettingsVisual Studio Code Workspace Settings
  3. Type window.title into the search bar

    Visual Studio Code Window TitleVisual Studio Code Window Title
  4. Click on the pencil tool and select Copy to Settings

    Visual Studio Code Copy To SettingsVisual Studio Code Copy To Settings
  5. Set the title to ${dirty}${activeEditorLong}

    Visual Studio Code Set TitleVisual Studio Code Set Title
  6. That’s it! For additional options, please visit https://code.visualstudio.com/updates/v1_10#_configurable-window-title

Note: My personal favorite window.title setting is “${dirty}${rootName}${separator}${activeEditorMedium}”

Arvixe shared hosting account no longer supports Let’s Encrypt SSL certificate

In my opinion Arvixe decision to block Let’s Encrypt SSL certificate on shared hosting is truly selfish.

First I applaud Let’s Encrypt for allowing us website owners who prefer not to spend hundred of dollars per year secure our websites. This benefits consumers tremendously, as it protects users data. With the prevalence of hackers nowdays, security is considered top priority.

Not only that, Google has implicated that websites with https has a slight boost in search ranking compared to http. It might not be a huge advantage, but it is an advantage nonetheless.

Some web hosting companies have a feature that directly generate Let’s Encrypt SSL certificates automatically in cPanel. Their main priority is security, not profit from selling SSL certificates. That earns my respect. Multiple requests had been sent to Arvixe to support this feature, all rejected. We had to go through many hoops to use the Let’s Encrypt SSL certificate on our sites, still better than not having it.

Now they have decided to block it entirely. Shameful in my opinion.

Read my correspondence with them below. I will update the blog if there is further development.

Jan 11, 2018


Email reply from Arvixe:

Hello,

You have uploaded the Lets Encrypt SSL certificate in the file manager. We do not install Let’s Encrypt Certificates on shared server. Its form and function requires a level of support, which we do not.

If you have purchased WildCard SSL from third party, then please upload it to the file manager and provide the location of it so that we will install it on our server.

If you require additional assistance, please feel free to contact us. We are available 24×7.

My Response:

Hi,

Is this a new policy? The previous certificate which expired recently was from Let’s Encrypt, and you allowed it before. Why is there a policy change?

I really hate to change server because of this. To be honest, you should just enable the standard SSL functions within cpanel and we can take care of the certificates ourselves, no support needed. Not sure why the CSR and CRT features are disabled, even godaddy allows these. I had to recommend clients to use other servers earlier because of your server blocking secured email ports which prevents the use of smtp email functions. All these restrictions will drive away customers for sure. I hope you reconsider.

Jan 16, 2018


Email reply from Arvixe:

Hello Ivan,

It is not the new policy. Before we used to support Lets Encrypt SSL certificate on our server’; however, now we have discontinued offering the Lets Encrypt SSL certificate. So, it is not possible to install Certificate on our server.

If you have any further queries feel free to contact us. We are available 24X7.

Sincerely,

After receiving this reply, I decided to move my site to MochaHost.com, which supports free Let’s Encrypt SSL certificate as a cPanel feature as well as guaranteed renewal rate (no more 100% price increase during renewal). This site is now hosted on MochaHost.com.

Note: If your web host does not support auto generation of Let’s Encrypt SSL certificate and you wish to learn how to generate one for your domain name, instructions can be found here.

Jan 10, 2018 (as of Jan 11, 2018, the following instructions are useless on Arvixe shared hosting accounts)


  1. On cPanel, select SSL/TLS Manager
  2. Under Private Keys (KEY), click on Generate, view, upload, or delete your private keys.
  3. Click Browse… and select the private.key file from your hard drive
  4. It is recommended that you enter the domain names in the Description field
  5. Click Upload
  6. Click Return to SSL Manager
  7. Arvixe.com does not give user access to Certificate Signing Requests (CSR) and Certificates (CRT), contact the support department directly and arrange to send them the 2 files: ca_bundle.crt and certificate.crt to complete the SSL certificate installation

How to generate FREE SSL certificate from Let’s Encrypt

  1. Visit https://www.sslforfree.com
  2. Sign in to your account (create one if you do not have an account yet)
  3. Under Active, select Create one now
  4. Enter your domain name (click on Advanced Options if you wish to register multiple domains under one certificate)
  5. Click on Create Free SSL Certificate
  6. Use one of the three methods to verify that you own the domain name(s)
  7. Once verification is completed, you should see the Certificate Successfully Generated screen
  8. Click on Download All SSL Certificate Files
  9. Install the SSL Certicate accordingly (contact your web host if you are not sure how, each host is different)

Manual Verification

  1. Create folder .well-known in the root folder of your domain name
  2. Create folder acme-challenge within .well-known
  3. Upload verification file to acme-challenge

Manual Verification (DNS)

  1. Click on Manually Verify Domain
  2. TXT record will be generated
  3. Go to the DNS editor of your hosting account (cPanel will be under Advanced DNS Zone Editor)
  4. Click on Download SSL Certificate

How to configure Google Search Console

  1. Visit https://www.google.com/webmasters/tools
  2. Sign in with your Google account (account can be created for free on https://accounts.google.com/SignUp)
  3. On the Welcome page, add the site you wish to optimize

    Google Search Console Welcome pageGoogle Search Console Welcome page
  4. Select a method to verify that you own the domain name.

    Google Search Console VerificationGoogle Search Console Verification
  5. It is recommended that you add domain names with and without www to the search console.
  6. Once both domain names are added and verify, you can pick the preferred domain under Site Settings

    Google Search Console Site SettingsGoogle Search Console Site Settings
  7. Select the country you are targeting under International Targeting > Country

    Google Search Console International TargetingGoogle Search Console International Targeting

AddToAny email button not working on WordPress

The AddToAny WordPress plug-in is a great tool, makes it very easy to share any web page on your website.

The email button can be problematic though. In some cases only a blank page is opened, and the error message “Please copy & paste if the app did not open:” shows up.

To work around this problem I recommend turning on the “Universal Email Button” feature of AddToAny. This will bring up a menu that allows the suer to select “Google Gmail”, “Outlook.com”, “Yahoo Mail” etc.

First, visit the AddToAny settings page on the WordPress Dashboard (Settings > AddToAny).

AddToAny settingsAddToAny settings

Scroll down to the “Additional JavaScript” section, expand it, and enter in the following code:

var a2a_config = a2a_config || {};
a2a_config.menu_type = "mail";

Click on “Save Changes” at the bottom to save the changes made.

From now on the “plus” button will bring up the email selection options.

AddToAny email optionsAddToAny email options

Best way to modify WordPress theme

Do not modify the template files directly (Appearance > Editor). If you update or upgrade the selected theme, all your changes will disappear.

Use child theme instead.

To start using child theme

Step 1: Create a child theme folder

  1. Create a folder for the child theme in folder wp-content\themes\
  2. Name the child theme folder with suffix -child
  3. For example, if parent theme folder is twentysixteen, the child theme folder should be twentysixteen-child

Step 2: Create a style.css file

  1. Within the child theme folder, create style.css
  2. Copy the style sheet header below, customize it, and add it to the top of style.css

    Important: The Template field must match the folder name of the parent theme
    Note: The mandatory fields are Theme Name and Template, the rest is optional
  3. Add style rules below the header

Step 3: Create a functions.php file

  1. Within the child theme folder, create functions.php
  2. Copy the code below

Step 4: Activate the child theme

  1. Under Appearance > Themes, the new child theme should show up now
    Hint: Add screenshot.png in the child theme folder to display a thumbnail for the child theme
  2. Click “Activate” to start using the child theme

Modify other files such as header and footer

All files within the theme folder can be modified. Examples:

Header section: header.php

Footer section: footer.php

Single post content section: template-parts/content-single.php

Make a copy from the parent theme folder and save it into the child theme folder. If a file does not exist, the parent file will be used.