Skip to content

Instantly share code, notes, and snippets.

View zeddee's full-sized avatar

Zed zeddee

View GitHub Profile
  • Killer feature of cPanel/WHM is multi-php.
  • Mainly because multi-php allows you to enable php-fpm with a single UI toggle.
  • Switching on php-fpm is basically zero-config in cPanel — enable it and the web server just starts using php-fpm.
  • (still not sure what goes on under the hood, which is a bit concerning, but i'm taking whatever i can get)
  • For comparison, setting this up without cPanel requires:
    • setting up apache to serve php application to php-fpm endpoint at :9000
    • setting up a reverse proxy that hits the php-fpm endpoint at :9000 and serves the processed content to :80 and :443
    • so we need install and configure: php-fpm, webserver1 that serves the php-fpm endpoint, webserver2 that reverse-proxies requests from :80 and :443 to webserver1:9000.
  • currently tracking performance improvements, but am optimistic.

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?