SQL: Count rows in a table without COUNT()

Use a dummy column

  • Add a dummy column to all rows with value as 1.
  • Print the sum of this dummy column to count the rows.
SELECT SUM(ROW_COUNT) AS COUNT
FROM (
    SELECT NAME, 1 AS ROW_COUNT
    FROM EMPLOYEE
);

Git Info Variables on Hugo

Enable Git Info Variables

Enable .GitInfo object for each page (if the Hugo site is versioned by Git). This will then update the Lastmod parameter for each page using the last git commit date for that content file.

Install Debian Jessie on WD MyCloud (Gen1)

De-attach WD Drive

  • You will have to open your WD MyCloud device and remove the HDD or drive inside it.
  • Attach the drive to your computer.
  • If you don’t have a Linux based OS installed on your computer, you can boot your computer through a live USB. See how to create one at ubuntu.com

Create Partitions

You can skip this section if you have not formatted the drive after connecting it to your computer and have the original partitions.