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
#!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 June 2, 2024 14:40
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 June 10, 2024 06:16
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:

@atoponce
atoponce / oi.js
Last active January 8, 2024 23:59 — forked from PaulCapestany/oi.js
Dan Kaminsky's DefCon RNG challenge
#!/usr/bin/env node
/**
* Forked from https://gist.github.com/PaulCapestany/6148566. Changes:
* - Beautified code
* - NodeJS-specific (will not work in the browser)
* - Scope variables with let and const keywords
* - 256-bit RNG
* - Remove von Neumann debiasing
* - Remove byte assembly

10,000 seconds RE:

Zone HR RE Ratio
1 80 15 0.0015
1 85 17 0.0017
1 90 19 0.0019
1 95 22 0.0022
1 100 24 0.0024
1 105 26 0.0026