Skip to content

Instantly share code, notes, and snippets.

View extratone's full-sized avatar
🗿
sudo exit

David Blue extratone

🗿
sudo exit
View GitHub Profile

Google Gemini Code Analysis

This JavaScript code is a Stimulus controller (indicated by import { Controller } from "@hotwired/stimulus") named notes, designed for managing encrypted notes within a web application, likely part of a larger application (possibly Micro.blog, given references like _microblog). It handles encryption, decryption, storage, retrieval, UI interactions, and integration with external services (CloudKit). Here's a breakdown:

1. Overview and Purpose

The controller manages user interactions and data flow related to encrypted notes. Key functionalities include:

  • Encryption/Decryption: Uses AES-GCM (Advanced Encryption Standard with Galois/Counter Mode) for strong client-side encryption. The user's secret key is stored in localStorage.
  • Key Management: Generates a new AES-256 key if one doesn't exist, allows the user to download the key, display it (with a QR code), and unlock notes with a previously generated key. Includes an option to delete the key from `
@extratone
extratone / wrc2025.ics
Created February 28, 2025 23:22
The 2025 FIA World Rally Championship race calendar in ICS format.
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Teamup Solutions AG//Teamup Calendar//EN
CALSCALE:GREGORIAN
METHOD:PUBLISH
DESCRIPTION:second_wing302-13989088
X-WR-CALDESC:second_wing302-13989088
X-WR-CALNAME:RallyTV | WRC Events
X-PUBLISHED-TTL:PT15M
SUMMARY:RallyTV | WRC Events
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@extratone
extratone / usosmphone.wiki
Created February 10, 2025 03:12
How to format United States phone numbers for OSM.

United States

The most-preferred format for phone numbers in the US is +1 NXX-NXX-NXXX, following a Discourse discussion on the subject. For example, . This format allows for internationalization while keeping the area code and local number separate for US users who seldom encounter international dialing prefixes. Phone numbers in the United States and Canada consist of the following four elements: "+" (plus sign), the international country code (always 1), the area code, and the local telephone number. Phone numbers should not have parentheses around any of these number elements, including the area code, as is common in many local representations of phone numbers.

This file has been truncated, but you can view the full file.
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//OpenCritic.com//OpenCritic 2025 Gaming Calendar//EN
NAME:OpenCritic Gaming Calendar
X-WR-CALNAME:OpenCritic Gaming Calendar
BEGIN:VEVENT
UID:3614e322-44a5-44c7-b93c-76d97d16f1a9
SEQUENCE:0
DTSTAMP:20250208T215238Z
DTSTART;VALUE=DATE:20150518
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

The following discussion is an archived debate of the proposed deletion of the article below. Please do not modify it. Subsequent comments should be made on the appropriate discussion page (such as the article's talk page or in a deletion review). No further edits should be made to this page.
The result of the debate was - kept

Hard to see anything special about this hig

@extratone
extratone / spacehey_icon.svg
Created February 6, 2025 16:47
Vector assets from [SpaceHey](https://spacehey.com/brand).
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.