Skip to content

Instantly share code, notes, and snippets.

View hard-truths.md

Software development hard truths

View software-development-anecdotes.md
  • Dead Space development struggling to integrate changes from multiple teams/experts: https://youtu.be/BQ3iqq49Ew8?t=655
  • Desktop apps: once in a while you kill a process eating all you RAM. Web apps: once in a while you kill the Google Chrome GPU task eating all your RAM after you open a GIF.
  • Today's browser wars: migrating a customer's 100s open tab from Chrome to Firefox/Edge/Opera/Safari.
  • Why it is important to make experimention cheap.
  • The origin of Control Plane vs Data Plane and how the concept influenced UNIX design
@juniorz
juniorz / HTTP.md
Last active Aug 8, 2022
Tools of trade
View HTTP.md

Keep-Alive

time telnet www-org.example.com 80

GET / HTTP/1.1
Host: www-org.example.com
Connection: keep-alive

(wait)
@juniorz
juniorz / dns.go
Last active Jun 14, 2022
XMPP SRV dns over Tor
View dns.go
package xmpp
import (
"errors"
"fmt"
"log"
"net"
"net/url"
"github.com/miekg/dns"
@juniorz
juniorz / README.md
Last active May 12, 2022
Annoying Kubernetes Issues
View README.md

kubectl logs has quirks due to log-rotation

kubectl logs does not take into account container log rotation (kubelet config containerLogMaxSize and containerLogMaxFiles). You can still find the latest rotated logs in /var/log/pods/<namespace>_<pod-name>_<pod-uid>/ though.

Don’t assume --since=0s will have all logs since the container started because it won't look into previous log files. Don't assume a long-running --follow will always give you latest logs, because it will not switch over to the new log after current is rotated.

See: kubernetes/kubernetes#59902

KUBECONFIG is not portable

@juniorz
juniorz / install_postgis_osx.sh
Created Jul 14, 2011
Installing PostGIS on Mac OS X and Ubuntu
View install_postgis_osx.sh
# Some good references are:
# http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x
# http://www.paolocorti.net/2008/01/30/installing-postgis-on-ubuntu/
# http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630392
#1. Install PostgreSQL postgis and postgres
brew install postgis
initdb /usr/local/var/postgres
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
@juniorz
juniorz / instructions.md
Last active Dec 3, 2020
Building tor on WD My Cloud EX2
View instructions.md

How to build tor for WD My Cloud EX2

WD My Cloud EX2 has an Marvell Armada-370 CPU (Marvell PJ4Bv7 Processor rev 1 (v7l)) with 512MB RAM.

This device uses 32-bit binaries with 64K page size. WD releases a cross-compilation environment as part of its "WD My Cloud EX2 GPL Source Code". Download it from WD support page (making sure it matches your firmware version) and follow the instructions in My_Cloud_EX2_Release_Notes_GPL_*.txt to setup the environment. I recommend using a Debian OS.

The following packages are required to use the cross-compilation environment: build-essential automake lib32z1

Building dependencies

View bizarre-daily-design.md

(not always bizarre, sometimes just backfiring daily design)

Kubernetes

@juniorz
juniorz / platform-engineering.md
Last active Oct 16, 2020
Reflections on the product space and the solution space for web-scale distributed containerized cloud systems
View platform-engineering.md

"Those that know, do. Those that understand, teach."

Aristoteles (supposedly)

Learning goals

  • Establish a taxonomy for this segment of software development industry (the domain).
  • Define evaluation criteria for products in the solution space.
  • Assess the landscape of the solution space and how they fit the market.
  • Better understand the problem space.