Skip to content

Instantly share code, notes, and snippets.

View typester's full-sized avatar
😇

Daisuke Murase typester

😇
View GitHub Profile
@typester
typester / CLAUDE.md
Created February 20, 2026 20:49
CLAUDE.md instructions to automatically update TODOs and track execution time (clocking) in org-mode

CRITICAL: Task File First — ABSOLUTE RULE

The following sequence is MANDATORY for EVERY unit of work. No tool calls, no research, no answering questions until steps 1-4 are complete.

Session Start (first request)

  1. Read ~/org/projects/awesome-project.org
  2. Find or create the parent TODO for the current task
  3. Create an AI subtask with :ai:claude: tag
  4. Open a CLOCK entry on the AI subtask (CLOCK: [YYYY-MM-DD DDD HH:MM])
  5. Show the user what you created and get confirmation before proceeding
// ==UserScript==
// @name Gemini Model Switcher (Cmd+Ctrl)
// @namespace http://tampermonkey.net/
// @version 1.2
// @description Switch Gemini models using Cmd+Ctrl+1 (Fast), Cmd+Ctrl+2 (Thinking), Cmd+Ctrl+3 (Pro)
// @author You
// @match https://gemini.google.com/*
// @grant none
// ==/UserScript==
@typester
typester / main.rs
Created December 12, 2023 05:11
2023 Advent of Code Day 9
const INPUT: &str = "..snip..";
fn main() {
let sum: i64 = INPUT.lines()
.map(extract_digits)
.map(|d| extrapolate_next(&d))
.sum();
println!("part1: {}", sum);
let sum: i64 = INPUT.lines()
@typester
typester / main.rs
Created December 10, 2023 17:00
2023 Advent of Code Day 8
use std::collections::HashMap;
use lazy_static::lazy_static;
use regex::Regex;
const INPUT: &str = "..snip..";
fn main() {
let mut iter = INPUT.lines();
@typester
typester / main.rs
Created December 9, 2023 17:33
2023 Advent of Code Day 7
use std::{collections::{HashMap, BinaryHeap}, cmp::Reverse};
const INPUT: &str = "..snip..";
fn main() {
let mut heap: BinaryHeap<Reverse<Cards>> = INPUT.lines()
.map(parse)
.fold(BinaryHeap::new(), |mut acc, cards| {
acc.push(Reverse(cards));
acc
@typester
typester / main.rs
Created December 6, 2023 15:48
2023 Advent of Code Day 6
use lazy_static::lazy_static;
use regex::Regex;
const INPUT: &str = "..snip..";
fn main() {
let races = parse_input(INPUT);
let mut res: usize = 0;
for race in races.iter() {
let count =
@typester
typester / main.rs
Created December 5, 2023 16:20
2023 Advent of Code Day 5
use lazy_static::lazy_static;
use regex::Regex;
const INPUT: &str = "..snip..";
lazy_static! {
static ref RE_NUM: Regex = Regex::new(r"(\d+)").unwrap();
}
#[derive(Debug)]
@typester
typester / main.rs
Created December 5, 2023 13:45
2023 Advent of Code Day 4
use std::collections::HashMap;
use lazy_static::lazy_static;
use regex::Regex;
const INPUT: &str = "..snip..";
fn main() {
let sum: u32 = INPUT.lines()
.map(parse_game)
@typester
typester / main.rs
Created December 3, 2023 14:02
2023 Advent of Code Day 3
use std::collections::HashMap;
const INPUT: &str = "..snip..";
#[derive(Debug)]
struct Info {
symbol_map: Vec<Vec<bool>>,
numbers: Vec<Number>,
}
@typester
typester / main.rs
Created December 3, 2023 14:01
2023 Advent of Code Day 2
use lazy_static::lazy_static;
use regex::Regex;
const INPUT: &str = "..snip..";
fn main() {
let sum: u32 = INPUT.lines()
.map(parse_game_info)
.filter(check_cube_count)
.map(|game| game.id)