Get the First or Last Value in a Group Using Group By in SQL

Sample code in PostgreSQL

SELECT
  account,
  MAX(ARRAY[id, (data->'credit')::int])
    FILTER (WHERE type = 'credit_set'))
FROM
  event
GROUP BY
  account;

ref: https://hakibenita.com/sql-group-by-first-last-value

USB-C cables

usb-c_protocol_chart
Turns out there are 6 kinds of USB-C cables.

  1. USB 2.0 rated at 3A
  2. USB 2.0 rated at 5A
  3. USB 3.2 Gen 1 (5gbps) rated at 3A
  4. USB 3.2 Gen 1 (5gbps) rated at 5A
  5. USB 3.2 Gen 2 (10gbps) rated at 3A
  6. USB 3.2 Gen 2 (10gpbs) rated at 5A

ref: https://people.kernel.org/bleung/how-many-kinds-of-usb-c-to-usb-c-cables-are-there

pyrasite

logo
Tools for injecting code into running Python processes

http://pyrasite.com/ (see the video in action)

https://github.com/lmacken/pyrasite

Image

Beef Cuts

beef-cuts-diagram-types

Ryobi Power Inflator

Kubernetes Failure Stories

https://k8s.af/

Redis and Memcached

https://aws.amazon.com/elasticache/redis-vs-memcached/

Redis is a superset of memcached, roughly speaking.