Skip to content

Instantly share code, notes, and snippets.

View jessearmand's full-sized avatar

Jesse Armand jessearmand

View GitHub Profile
@jessearmand
jessearmand / gemini.md
Last active July 3, 2025 18:04
claude custom slash commands
allowed-tools description
Bash(gemini:*), Bash(cd:*), Bash(ls:*), Bash(pwd:*)
Use `gemini` to analyze large codebases with massive context window

Analyze large codebase with gemini-cli

When you need to debug issues involving a large size of related code relationships in the codebase, or when analyzing entire project, use gemini

Usage

@jessearmand
jessearmand / CLAUDE.md
Last active July 5, 2025 15:53
CLAUDE.md user memory

Coding Style

  • Use 4-space indentation, unless project or editor settings is configured otherwise
  • Use the available tools such as sg for code structural search, lint or rewriting, cheatsheet: @~/.claude/ast-grep-rule.md
  • Use rg instead of the classic grep for recursive search, manual or automatic filtering of file patterns
  • Use gemini to prompt for more understanding in large documents, images, or directory of files
  • Be precise and targeted in examining where changes need to be made
  • Avoid inline styles, create separate CSS files
  • Avoid creating a large file, split it into reusable modules
  • Refactor long functions into smaller, reusable functions
@jessearmand
jessearmand / gist:1e6aba7ef7881bda36493076250fe7f3
Created December 22, 2024 07:43
hdzero goggle flickering fix
1. Update Goggle to rev.9.4.0;
2. After updating this firmware, power off the Goggle;
3. Create a vclk_phase_inv.txt in the root directory of the SD card;
4. Write the following information in vclk_phase_inv.txt:
MODE1 0x07
5. Insert the sd card into the Goggle and restart, vclk_phase_inv.txt will be deleted, please check whether the issue is fixed;
6. If it is not repaired, please retry step 3-5. And change the content to the new ones; (eg: Replace the parameter in step 4 with MODE1 0x06)
7. Follow step 6, and modify the parameters in the file in sequence until Goggle can work properly.
MODE1 0x06
MODE1 0x05
@jessearmand
jessearmand / hdzeroTStoMP4.sh
Last active February 18, 2024 13:05
Convert HDZero DVR ts format to mp4 with H265 codec
#!/usr/bin/env sh
# Check if exactly 2 arguments are given
if [ "$#" -ne 2 ]; then
echo "Usage: $0 input_filename.ts output_filename.mp4"
exit 1
fi
input_file="$1"
output_file="$2"
@jessearmand
jessearmand / bing_parse_latlon.rs
Last active March 25, 2023 08:08
parse_latlon (Generated by Bing)
use exif::{DateTime, Field, Reader};
use regex::Regex;
use std::env;
use std::fs::File;
use std::io::{BufReader, Error};
use std::path::PathBuf;
use walkdir::WalkDir;
fn main() -> Result<(), Error> {
let re = Regex::new(r"\.(jpg|jpeg|png|gif|mp4|mov)$").unwrap();
@jessearmand
jessearmand / parse_latlon.rs
Last active March 25, 2023 08:11
Parse latitude longitude information from Exif tag for files in a directory (initial boilerplate from you.com, improved with kamadak-exif sample code)
use std::env;
use std::fs;
use std::fs::File;
use std::io::BufReader;
use std::path::PathBuf;
use exif::{In, Reader, Tag};
fn main() {
let args: Vec<String> = env::args().collect();
@jessearmand
jessearmand / Mutation.swift
Created March 23, 2019 13:30
To test class mutation in Swift. The same behaviour as Kotlin, when the class has mutable properties
//: [Previous](@previous)
/*:
# Mutation
To test class mutation in Swift.
The same behaviour as Kotlin, when the class has mutable properties.
*/
@jessearmand
jessearmand / Mutation.kt
Last active March 23, 2019 13:40
Node mutation. Testing how a class is being mutated on Kotlin.
/**
* You can edit, run, and share this code.
* play.kotlinlang.org
*/
class Node(name: String) {
var position: FloatArray = floatArrayOf(0.0f, 0.0f, 0.0f)
var rotation: FloatArray = floatArrayOf(0.0f, 0.0f, 0.0f, 0.0f)
var name: String = name
var children: Array<Node> = emptyArray()
@jessearmand
jessearmand / NSColor+isLight.h
Created May 16, 2018 03:11 — forked from kaishin/NSColor+isLight.h
Programmatically determine the perceived lightness of a color. More details on: http://robots.thoughtbot.com/closer-look-color-lightness + Online tool: http://thoughtbot.github.io/color-lightness-test/
#import <Cocoa/Cocoa.h>
@interface NSColor (isLight)
- (BOOL)isLight;
@end