Sunday, February 26, 2023

Use xargs

Get out of the habit of using while read as an idiom and instead use xargs to process arguments when you're doing batch compute stuff.

Saturday, January 21, 2023

Mm .. Malware Analysis

TL;DR: Analysis of malspam potentially targeting an organization. C#/.NET binary using KoiVM, process hollowing, and abusing vulnerable procexp152.sys driver.

Friday, January 20, 2023

Cannabis vs Cognition

Searching through papers this morning curious about evidence-based studies on cannabis (and synthetic cannabis[1][2]) in relation to psychosis, schizophrenia, and general effects on cognition.

Saturday, December 24, 2022

FrodoPIR

This morning I'm currently staring down a stack of research papers on my desk. But I just saw a headline from Hacker News that Brave, a privacy-preserving browser I'm a fan of, published a paper and code for an improved private information retrieval system.

Saturday, November 19, 2022

James Garfield's Pythagorean Proof

Today I learned James Garfield, who once worked as a lawyer, Civil War General, and served as the 20th President of the United States, was math savvy and published a novel Pythagorean theorem proof.[1]

\[ \text{Area}_{\text{trapezoid } ACED} = \frac{1}{2} \cdot (AC + DE) \cdot CE = \frac{1}{2} \cdot (a + b) \cdot (a + b) = \frac{(a + b)^2}{2} \] \[ \begin{aligned} \text{Area}_{\text{trapezoid } ACED} &= \text{Area}_{\Delta ACB} + \text{Area}_{\Delta ABD} + \text{Area}_{\Delta BDE} \\ &= \frac{1}{2}(a \times b) + \frac{1}{2}(c \times c) + \frac{1}{2}(a \times b) \end{aligned} \] \[ (a + b) \times \frac{1}{2}(a + b) = \frac{1}{2}(a \times b) + \frac{1}{2}(c \times c) + \frac{1}{2}(a \times b) \] \[ a^{2} + b^{2} = c^{2} \]

Small Pieces

We can take this in smaller pieces. First, we can find the area of the right-angled trapezoid with the following equation:

\[ \text{Area}_{\text{trapezoid}} = \frac{1}{2} \cdot (a + b) \cdot (a + b) = \frac{(a + b)^2}{2} \]

We can find the area of each of the two outer triangles with the following:

\[ \text{Area}_{\text{triangle}} = \frac{ab}{2} \]

And the area of the inner triangle with:

\[ \text{Area}_{\text{inner triangle}} = \frac{c^2}{2} \]

Proof

Reducing, we can go to the end, beginning with our substituted and now simplified area equation demonstrated above:

\[ \frac{(a + b)^2}{2} = 2 \cdot \frac{ab}{2} + \frac{c^2}{2} \]

Then we expand \( (a + b)^2 \) on the left hand side. And our equation on the right can also be simplified since we're both multiplying and dividing \( ab \) by 2:

\[ \frac{a^2 + 2ab + b^2}{2} = ab + \frac{c^2}{2} \]

Multiply both sides by 2 to eliminate denominators:

\[ a^2 + 2ab + b^2 = 2ab + c^2 \]

Lastly, subtract \( 2ab \) from both sides:

\[ a^2 + b^2 = c^2 \]

Footnotes

  1. Mathematical Treasure: James A. Garfield’s Proof of the Pythagorean Theorem ↩︎

Wednesday, October 05, 2022

Casio F-91 Repair

Exposure to harsh weather wore my watch band down until eventually breaking. So, I re-strapped my F-91W with a sport-grade band (and spring bars) from a W-216H.

Saturday, September 03, 2022

Euler's Equation

Euler's number, e, the constant 2.71828, is the base of the natural logarithms. Given n approaching infinity, Euler's number is the limit of:

\begin{align*}\displaystyle{\displaylines{(1 + 1/n)n}}\end{align*}

It's used frequently abroad across the sciences. It can also be elegantly expressed as an infinite series, like so:

\begin{align*} {\displaystyle e=\sum \limits _{n=0}^{\infty }{\frac {1}{n!}}=1+{\frac {1}{1}}+{\frac {1}{1\cdot 2}}+{\frac {1}{1\cdot 2\cdot 3}}+\cdots .} \end{align*}

Separately, the imaginary unit i, \({\displaystyle {\sqrt {-i}}}\), represents the imaginary solution to the quadratic equation, x2 + 1 = 0. The value can also be used to extend real numbers to complex numbers.

And π is pi, the irrational number we all know and love, roughly approximate to 3.14159, representing the ratio of the circle's circumference to its diameter.

While it isn't absolutely understood, we can join the three numbers in a seemingly bizarre proof that just works.

\( {\displaystyle e^{i\pi }=-1} \)

Using Python To Access archive.today, July 2025

It seems like a lot of the previous software wrappers to interact with archive.today (and archive.is, archive.ph, etc) via the command-line ...