Application window disappearing off edge of monitor (Windows 10)

In the last week I’ve had 2 instances of opening an application/program opening in Windows 10 and disappearing off the edge of one of my monitors.

My workstation is a HP OMEN gaming laptop with 2 attached monitors in a horizontal row. Unplugging monitors did not cause the hidden window to reappear.

 

The solution is reasonably simple.

1. Hold down the shift key and right-click on the application icon in the Windows task bar.

2. A context menu will appear. Select the “Move” option.

3. Immediately hold down the left mouse button. This will have the affect of selecting the title bar of the application and activating the ability to move that application’s window.

4. Still holding down your left mouse button (the primary button), move your mouse left and/or right and you should soon see your missing program window appear on the monitor.

(In both instances my application disappeared of the right side of my right-hand monitor. This may vary for different people.)

Turn ASCII list of text URLs into HTML list of hyperlinks (with Regex and Notepad++)

I have a plain-text (ASCII) list of URLs, with each URL on a new line, and I need to turn it to a HTML list (<ul>) of actual anchor links (<a>).

For example, I start with:

https://www.site1.com/
https://www.site2.com/
https://www.site3.com/
https://www.siten.com/

And want to end up with:

<ul>
<li><a href="https://www.site1.com/">https://www.site1.com/</a></li>
<li><a href="https://www.site2.com/">https://www.site2.com/</a></li>
<li><a href="https://www.site3.com/">https://www.site3.com/</a></li>
<li><a href="https://www.siten.com/">https://www.siten.com/</a></li>
</ul>

In Notepad++ It’s trivial.

  • Paste your list of links into a new document.
  • Open the “Find” dialogue (Ctrl+F).
  • In the “Search Mode” options select “Regular expression”.
  • For “Find what” enter: ^(.+)$
  • For “Replace with” enter: <li><a href=”\1″>\1</a></li>
  • Select “Replace All”.
  • Then you just have to add the “<ul>” and “</ul>” on the first and last lines (respectively).

That’s it.

And here it is with images:


Image 1: The ASCII list of links.


Image 2: A clearer view of the FInd/Replace interface.


Image 3: The result of “Replace All”.

Don’t forget to add the “<ul>” and “</ul>” on the first and last lines.

(Update – 5 minutes later): I just noticed I can set the transparency of the Find/Replace dialogue, so didn’t need the second image. Oh well…)

Copying from Excel adds quotes to pasted values

This is a problem that had me stumped for a moment today until I searched and found the answer.

I was using Excel string concatenation to generate SQL INSERT statements for a database import.
It was working fine until suddenly each cell I copied from Excel pasted with a double-quote (“) around the value.

The first answer to my Google search made we realise the problem: I’d added a line-break in the middle of my formula to help visualise my work while I was constructing the SQL.
It turns out when you add line breaks to cells in Excel, copied values are surrounded by quotes.

This actually makes sense when you think about it . Consider it in the context of working with CSV files – you need to distinguish between a line-break in a value and a new row/record in the file.
It just didn’t occur to me because now I’d never encountered it in this context.

Remove the line break and no more quotes are added to the copied values.

 

Alternate post title: ‘Excel: Copying cell with formula sometimes wraps value in double quotes (“)’

Add 2FA (2 Factor Authentication) for your Gmail and Google GSuite users

UPDATE (31 January 2019): This week I have switched across to Authy as my 2FA application of choice. The main reason being its backup capability, which gives me greater peace of mind if my phone ever dies (or needs to be changed).
Also, some of the top security people I follow use it too.

 

You really should be using 2 Factor Authentication (2FA or MFA) in your online accounts whenever it is available, especially if you re-use your passwords across accounts. Regardless, it’s a good extra layer of security to help protect your important assets.

I have a Gmail account and run 2 domains on Google’s GSuite.

For all Google’s greatness their documentation, like documentation of most large (and small) tech companies, is good but still hard to find and navigate through unless you know what you’re looking for (in fact most tech companies product zero to atrocious documentation in my humble opinion).

 

Here are 2 links to Google Support to help you get started with 2FA on your Google accounts:

  1. For domain administrators
    Set up 2-Step Verification for your domain: https://support.google.com/a/answer/184711?hl=en
  2. This is for individual users of the domain (i.e. email address holders) and GMail users.
    Turn on 2-Step Verification: https://support.google.com/accounts/answer/185839
    The support page contains a link to https://myaccount.google.com/signinoptions/two-step-verification/enroll-welcome which is where users actually get started.

With Google/GSuite accounts you can setup 2FA using: one or all of SMS, phone call, the Google Authenticator app (Play Store / iTunes), and downloadable one-time backup codes (store those in your password manager, like LastPass or 1Password. You have one of those, right?).

I particularly like the Google Authenticator Authy app.
Both Google Autneticator and Authy easy to use and integrate well with most services (e.g. Evernote, Dropbox and DigitalOcean).

Google GSuite – Allow email connection from Outlook

While trying to add a Googe GSuite email account in Microsoft Outlook, you may find it impossible to authenticate – Outlook will keep displaying the username/password dialogue during the account setup.

This is likely because by default Outlook is considered a “less secure” app by Google and won’t allow the connection.

Check out the “Let less secure apps use your account” page at https://support.google.com/accounts/answer/6010255?hl=en&authuser=1 for instruction on how to let a GSuite user allow Outlook to access their account.

Note: The GSuite domain owner will need to first update a setting in the domain administration to allow users to access the page that has the switch for their account.
I can’t remember the exact location of the domain admin setting, but log into your GSuite domain account and do a search for “less secure app account access” – you should easily find it then.