Author: saminmel

Building a docker image with nodejs, bower, karma-cli, chrome

We need to have a docker image with nodejs, bower, karma-cli, chrome. It will be used in Bitbucket Pipeline for building a SPA using angularjs.

Github link.

Once you pull down the source, you can play with it.

  • To build the container image,
    docker build -t nodejschrome:dockerfile .
    
  • To tag

    docker tag [id] [your_docker_account]/nodejschrome
    
  •  To push

    docker push [your_docker_account]/nodejschrome:tag;
    
  • To run bash in the container
    docker run -i -t [id]
    

If you need to use it in Bitbucket Pipeline, just specify the image you will use in your bitbucket-pipelines.yml file

image: samsiumelbourne/nodejschrome

Windows 10 Cortana Search Doesn’t Respond to Keyboard – Solved

Windows 10 Cortana Search doesn’t respond to keyboard at all but you can paste contents in the box.

Solution is simple that you can hardly imagine: run ctfmon.exe

Contacted Microsoft support and someone remoted to my laptop. He recommended me to install CREATOR update. I did. Not solved. Contacted them a second time, someone remoted and check my laptop settings and said he wouldn’t fix as it’s on a Mac.

As I am running my Windows in Parallels, I contacted Parallels support and the technician said it’s a native windows problem, and advised me to run ctfmon.exe. BANG! Solved magically.

Looks like people from outside Microsoft knows more about Windows.

Improving SQL query readability (1)

From SQL Server 2008, using ‘TRUE’ and ‘FALSE’ is supported for BIT data type in SQL query. You can use this to improve SQL query readability.

Per doco, the string value ‘TRUE’/’FALSE’ used will be converted to BIT values automatically. (No, you can’t use ‘YES’/’NO’ or ‘YAY’/’NAY’…)

Microsoft’s official doc on BIT data type

So instead of using 0/1, you can use ‘TRUE’/’FALSE’ to improve query readability.

Examples
(IsEnrolled is of BIT data type)


SELECT [Id]
,[Age]
,[Name]
FROM [dbo].[Students]
WHERE [IsEnrolled] = 'TRUE'

UPDATE [dbo].[Students]
SET [IsEnrolled] = 'FALSE'
WHERE [Id] = 3