Skip to content

Instantly share code, notes, and snippets.

View atoponce's full-sized avatar
Crypto coffee

Aaron Toponce atoponce

Crypto coffee
View GitHub Profile
> deck
[
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
45, 46, 47, 48, 49, 50, 51, 52
]
> shuffle.mongean(deck
@atoponce
atoponce / genpass-apple.zsh
Last active September 11, 2024 00:52
Password generators written in ZSH
#!/usr/bin/env zsh
#
# Usage: genpass-apple [NUM]
#
# Generate a password made of 6 pseudowords of 6 characters each
# with the security margin of at least 128 bits.
#
# Example password: xudmec-4ambyj-tavric-mumpub-mydVop-bypjyp
#
# If given a numerical argument, generate that many passwords.
#!python3
gpus = 12 # rtx 4090
rate = 164.1 * 10**9 * gpus # md5
mins = 60 # seconds
hours = 3600 # seconds
days = 86400 # seconds
weeks = 86400 * 7 # seconds
months = 86400 * 30 # seconds
years = 86400 * 365.25 # seconds
@atoponce
atoponce / gels.md
Created June 4, 2024 23:13
Table of several energy gels for endurance athletes and their analysis results.

Gel Nutritional Facts

Sample Requestor Date Serving Actual Serving Diff. Label kCal Actual kCal kCal Diff. Label CHO Actual CHO CHO Diff.
Gu Chocolate Outrage Jason Koop 2024-05-29 32g 32g 0% 100 113 +13% 21g 24g +14%
Gu Strawberry Banana Brady Burgess [2024-06-04](https://www.irunfar.com
@atoponce
atoponce / canyons.md
Last active August 5, 2024 21:22
Some downhill canyon routes for training the quads. A few of the routes could be modified to add/remove mileage as needed. For those courses with two grades listed, there is a notable flat or uphill section somewhere in the middle for at least 1 mile. The Ogden and St. George and Marathons are listed as benchmarks.
@atoponce
atoponce / chaocipher-test-vector.txt
Last active May 23, 2024 16:56
Chaocipher analysis
> const Chaocipher = require('./chaocipher.js')
undefined
> const left = "HXUCZVAMDSLKPEFJRIGTWOBNYQ"
undefined
> const right = "PTLNBQDEOYSFAVZKGJRIHWXUMC"
undefined
> const pt = "WELLDONEISBETTERTHANWELLSAID"
undefined
> const cipher = new Chaocipher(left, right)
undefined

I didn't hit my goal of 1:25, but I knew that was very likely out of reach. But 1:28 felt very much within grasp. First, some stats:

  • Overall: 66/2797
  • Male: 57/1178
  • Male 45-59: 3/137
  • Male Masters: 11/512

I got up at 3:30 in the morning to have two slices of toast and make 500 mL of coffee. I took 1,000 mg of acetaminophen before heading out the door to make sure it was in my system before starting the race. When I got to the start line about 6 AM, I had a full banana and called it good on nutrition. I had a Maurten 100 gel with me for mile 8 as a safety net.

I started the first 4.4 miles to the spillway with the 1:30 pacer. It's very flat so I knew if I stuck with him, provided my HR and power weren't going into Z4, I would be okay. That seemed to pay off. The goal was to average 6:50 for those first 4.4 miles, and I averaged 6:51. Right on target.

Paces running 10×3' intervals @ 5K-10K pace with 3' recovery between intervals on the same route.

Pace is min/km. Lower pace difference is better.

Interval 9/23 Pace 4/24 Pace Pace Diff
1 4:22 4:05 -0:17
2 4:20 3:59 -0:21
3 4:15 4:01 -0:14
4 4:16 3:53 -0:19
@atoponce
atoponce / trivium.js
Last active April 4, 2024 17:59
Trivium stream cipher with test vectors
"use strict"
/** Class representing the Trivium stream cipher. */
module.exports = class Trivium {
#state // Trivium 288-bit state.
#keystream // Trivium keystream.
/**
* Initialize Trivium with key and IV.
* @param {Uint8Array} key - An 8-bit array of 10 unsigned integers.
@atoponce
atoponce / k4.md
Last active November 7, 2024 13:30
No, ChatGPT didn't solve Kryptos 4

So you think ChatGPT solved K4? You're not the only one. First, here's the K4 ciphertext and clues:

                           OBKR
UOXOGHULBSOLIFBBWFLRVQQPRNGKSSO
TWTQSJQSSEKZZWATJKLUDIAWINFBNYP
VTTMZFPKWGDKZXTJCDIGKUHUAUEKCAR

Jim Sandborn, the creator of the sculpture and puzzle has given us clues, revealing that characters: