Debian install notes

I’m moving lots of my machines back to Debian in the yearning for rock solid stability and a complete distribution that just works. Debian was the first GNU/Linux I ever used as a teenager back in late 90s and I’ve fond memories of it. Starting with the official amd64 install guide. Preparation Make USB key I quickly discovered I want the image that includes proprietary firmware, so I can get my (nasty) wifi card working as quickly as possible. ...

July 11, 2021 · 3 min

Notes from the book Atomic Habits

I just read the kindle edition of Atomic Habits by James Clear. Its worth the time investment, giving practical ways for building desired habbits and more importantly, breaking bad ones. The habit loop The four stages of habit are an endless cycle. This habit loop is continually scanning the environment, predicting what will happen next, trying out different responses, and learning from the results. The cue triggers a craving That motivates a response That provides a reward That satisfies the craving and, ultimately, becomes associated with the cue 4 laws of behavior change The pillars of the book, are the four stages of the habit building process: ...

June 12, 2021 · 15 min

Binary Similarity Analysis Technical Paper

An academic paper I authored in May 2019, as part of studying Reverse Engineering at UNSW. Abstract Extracting meaningful semantic differences between software binaries without source code is difficult. This is a challenging problem due to the overwhelming amount of syntactic noise that small changes can result in at the assembly level. Curiously when it comes to program semantics the “signal from the noise” can be distilled in a manner that is both static and processor agnostic, through the application of control flow and graph isomorphism analysis, symbolic execution and theorem proving. The graph isomorphism problem has no known polynomial time algorithm (i.e. is NP) making brute force approaches computationally infeasible. By blending various static analysis techniques and applying some generalisations, consider a novel approach to overcoming the computationally infeasibility of this problem domain with a view to binary difference analysis. ...

May 29, 2021 · 17 min

Hiking pack system

Stacked packing system Inner pack Side pockets Front pocket Options Ditty bag Food Cold soak meal recipes Refried beans Pinto beans Cous Cous Veggies Oil wrap Potato Bomb Rice Bomb Oatmeal Cereal Useful resources Lessons learned April 2021 November 2021 Over the last year I have been experimenting with reducing the weight of my hiking pack when out on track. Reading books on ultralight hiking, has me with some strategies for doing so. ...

May 29, 2021 · 5 min

Gentoo Linux

The next step in my minimalist computing journey. Enter Gentoo, my first source based GNU/Linux distro. Pre-packaged binaries, which is the approach most other (binary based) distros take, must often cater for the lowest common denominator to ensure packages can run on lots of differing setups out in the wild. On a source based distro, I can articulate my specific needs (USE flags on Gentoo) to finely tune the binaries to my system. For example, as I plan to steer clear of software like systemd, kde and gnome, I can ensure support for these packages is NOT built into other program binaries I build for my system. ...

February 22, 2021 · 13 min

KVM virtualisation

The Kernel Virtual Machine is a hypervisor for Linux on hardware with virtualization extensions (Intel VT or AMD-V). It is deployed as a loadable kernel modules, kvm.ko, and either kvm-intel.ko or kvm-amd.ko. The KVM Debian Wiki rocks, and provides details on the basics including a great performance tuning section. Install Administration tasks User specific vs system wide VMs List VMs Start VM Shutdown VM Murder (hung) VM Autostart default NATed bridged network What if the default network interface is not listed How to extend / increase a partition Use network ISO source for new VMs Windows VM disk driver Install Easy instructions to get QEMU/KVM and virt-manager up and running on Arch. ...

October 31, 2020 · 4 min

Kubernetes

The name Kubernetes originates from Greek, meaning helmsman or pilot. Terminology Essentials Help Bash kubectl completion Web UI dashboard Pods Creating a pod Option 1: Imperatively with the CLI Option 2: Declaratively with YAML Port forwarding Managing pods Pod Health Deployments and ReplicaSets ReplicaSet Deployment Deployments with kubectl Deployment Options Rolling updates Blue Green Canary Rollbacks StatefulSets Services Service Types Port forwarding take 2 Services YAML NodePort example ExternalName example Testing Service and Pod with curl Storage Volumes Volume Types Viewing a Pods volumes emptyDir volume example PeristentVolumes and PeristentVolumesClaims StorageClasses Managing configuration with ConfigMaps and Secrets Defining ConfigMaps Consuming ConfigMaps Secrets Secret best practices Storing Secrets Using Secrets Secrets as environment variables Secrets as files Troubleshooting Logs Configuration verification Shell into Pod container The API General kubectl Waaay cool Samples node.js app microk8s Shell improvements PersistentVolume storage location Resources Terminology k8s is two concepts; the control plane and nodes. ...

August 18, 2020 · 20 min

Installing Arch Linux on the Pinebook Pro

Updated 2022-04-11: Installed a minimal version of Manjaro, a SLICK flavour of Arch The pinebook pro is a beautiful 64-bit ARM based laptop, that reminds me of the form factor of a modern macbook air, shipping with a premium magnesium alloy shell, 64GB eMMC and a 10,000 mAH battery. All this for $200. As a NIX machine, I’ve found Manjaro to be delightful. I have dreams of one day installing OpenBSD. ...

July 27, 2020 · 3 min

8-bit CPU build

This material is based on the high quality build your own CPU guide by Ben Eater. Ben cites the SAP-1 CPU architecture as the design inspiration for the CPU, which originated from the book Digital Computer Electonics by Albert Paul Malvino. The SAP (Simple As Possible) computer has been designed for you, the beginner. Its purpose, to introduce the crucial ideas behind a CPUs operation without burying you in unnecessary detail. Architecture General Electonics Dirty power Resistors Capacitors Latch vs flip flop D flip flop The clock The registers Arithmetic and Logic Unit (ALU) Design Implementation Representing negative numbers - signing bit, 1’s and 2’s complement Ones complement Two complement Program Counter (PC) PC module problem 1: counter clearing PC module problem 2: dirty clock signal Output register Arduino Nano EEPROM programmer Binary to decimal 7-segment decoder Multiplexing four 7-segment displays with a single EEPROM Handy resources Architecture The SAP-1 defines a number of logical CPU modules which are capable of integrating to form a working CPU and ultimately computer. ...

July 12, 2020 · 19 min

Redux

Once you start working with React in anger, there is a tipping point to be aware of where: the complexity of data flows piles up the same data is being rendered in multiple places the number of state changes blow out Being able to tackle these problems in a single place is where Redux fits in. Contents Contents The Problem Option 1 lift the state Option 2 react context Option 3 Redux A chat with redux Container vs Presentation Components The Redux Principles Actions The Store Immutability Reducers React-Redux React-Redux Provider React-Redux Connect mapStateToProps mapDispatchToProps Redux Setup Async and APIs Mock API API Client Wrappers Redux Middleware Redux Async Libraries Thunks Conditional mapStateToProps Polish (the finer things) Spinner component Status API and feedback Server side validation Client side validation Optimistic deletes Testing Redux Connected Components Action Creators Thunks Reducers Store The Problem Imagine a fairly deep component hierarchy, starting with your top level App component. Deep down the tree, there are two child components that need to access a common piece of data (e.g. customer data). How should these components access the data they require? ...

April 29, 2020 · 21 min