Skip to content

Instantly share code, notes, and snippets.

@josejuanmontiel
josejuanmontiel / antigravity.md
Last active June 1, 2026 20:21
Que opinas de los siguientes patrones?
imagen

Evaluating Toolset

I'm currently focused on assessing available tools to best address this task. My initial thought is to craft a script, which I will evaluate against existing utilities. Specifically, I'm considering if view_file or grep_search are applicable. This prioritizes the best tool for the job.

Choosing Python Solution

I've decided to proceed with a Python script. Given the algorithm's self-contained nature, I'll write the code directly as it is straightforward implementation. I am planning to test it in scratch/timeline_flattening.py, as requested by the user. I'll focus on providing clean code, including an illustrative example.

@josejuanmontiel
josejuanmontiel / FileLocking.java
Last active December 13, 2018 15:37 — forked from syazawa/FileLocking.java
Example of inter-process and inter-thread file locking in Java
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.channels.FileChannel;
import java.nio.channels.FileLock;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;