Skip to content

Instantly share code, notes, and snippets.

View zeddee's full-sized avatar

Zed zeddee

View GitHub Profile

Chinese AI Monitoring Students

Facial recognition

Louise Moon, "Pay attention at the back: Chinese school installs facial recognition cameras to keep an eye on pupils ", published 16 May 2018 on South China Morning Post. Available: https://www.scmp.com/news/china/society/article/2146387/pay-attention-back-chinese-school-installs-facial-recognition

The school said it could use the cameras to analyse pupils’ facial expressions to determine whether they were enjoying lessons and whether they were paying attention.

Google Cloud Storage Notes

Documentation: https://cloud.google.com/storage/pricing#operations-by-class

Difference between Standard, Nearline, and Coldline storage

  • There are 3 storage classes for google cloud storage.
  • Docs describe the use-cases for each storage class, but needed to do a bit of close reading to understand the difference between the 3 products in terms of cost and usage.

Resources for reading Safiya Umoja Noble's ALGORITHMS OF OPPRESSION

Other books that discuss algorithmic oppressions

// where extension url is https://chrome.google.com/webstore/detail/curatour/kcegjcijbfgpmgbnkgdhjihjpbjljfeb
https://clients2.google.com/service/update2/crx?response=redirect&prodversion=49.0&x=id%3D<Extension_ID>%26installsource%3Dondemand%26uc

(INCOMPLETE) Installing Wordpress + PHP-fpm from scratch on ubuntu

Install PHP

sudo apt-get install php-fpm # installs php7.2-fpm
sysctl status php7.2-fpm # checks status

Install NGINX to serve the PHP-fpm endpoint

Using the doctl CLI tool

Install and use the doctl tool to manage Digital Ocean droplets.

Sample script to start up a DO droplet for running Lighthouse:

doctl compute droplet create lighthouse-runner \
  --size s-1vcpu-1gb \
  --region sgp1 \
#!/usr/bin/env sh
# This script:
# 1. Creates a new directory to store the reports we're going to generate.
# 2. Generate a lighthouse report for desktop emulation.
# 3. Generate a lighthouse report for mobile emulation, with basic 3G throttling settings taken from here: https://github.com/GoogleChrome/lighthouse/commit/a9b02a948b579be1a0667b69627f6d1f831d30ca
run() {
NOW=$(date +%Y-%m-%dT%H%M%S%z)
OUTPUT_FORMAT="html"

Svelte notes

Notes while going throught: https://svelte.dev/tutorial/

Personal thoughts:

  • pretty quick to get through
  • excited that it's a compiled language
  • types? compatible with typescript, since you also need to invoke it like the ts compiler?

gcloud cheatsheet

Basic

Command Description
gcloud auth login log into google cloud console with credentials
gcloud config set project <PROJECT_ID> set project ID (local gcloud starts without a set active project)
gcloud beta interactive enters a very very awesome "interactive" mode with autocomplete and command preview.
gcloud config set compute/zone asia-southeast1-a sets compute zone to given zone id.