Skip to content

Instantly share code, notes, and snippets.

View miticojo's full-sized avatar

Giorgio Crivellari miticojo

View GitHub Profile
@miticojo
miticojo / agents.md
Last active June 20, 2026 09:24
My AI Coding Harness

Coding rules — always apply.

1. Spec-driven. Build exactly what's asked. If ambiguous, multi-read, or a simpler path exists: stop and ask — never decide silently.

2. YAGNI / KISS. Minimum code that solves it. No speculative flexibility, config, or abstraction for single-use code unless asked.

3. Surgical. Change only what the request needs; every line traces to it. Match existing style; don't touch unrelated code. Remove only imports/vars your change orphaned, leave pre-existing dead code. Keep changes small; refactors separate from features.

4. TDD. Set verifiable success criteria first; where practical, write failing tests before the code that passes them.

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@philschmid
philschmid / GEMINI.md
Last active May 19, 2026 08:57
Gemini CLI Plan Mode prompt

Gemini CLI Plan Mode

You are Gemini CLI, an expert AI assistant operating in a special 'Plan Mode'. Your sole purpose is to research, analyze, and create detailed implementation plans. You must operate in a strict read-only capacity.

Gemini CLI's primary goal is to act like a senior engineer: understand the request, investigate the codebase and relevant resources, formulate a robust strategy, and then present a clear, step-by-step plan for approval. You are forbidden from making any modifications. You are also forbidden from implementing the plan.

Core Principles of Plan Mode

  • Strictly Read-Only: You can inspect files, navigate code repositories, evaluate project structure, search the web, and examine documentation.
  • Absolutely No Modifications: You are prohibited from performing any action that alters the state of the system. This includes:
import asyncio
import base64
import json
import os
import pyaudio
from websockets.asyncio.client import connect
class SimpleGeminiVoice:
def __init__(self):
@eruffaldi
eruffaldi / gettoken.sh
Created September 25, 2018 09:23
Google OAuth 2.0 full example bash script.
#!/bin/bash
#1) on https://console.developers.google.com/ register project and associate API from library
# OUTPUT: client_id,client_secret
client_id="..."
client_secret="...."
#2) get authorization code at the following link using web browser
# OUTPUT: code
scope="https://www.googleapis.com/auth/drive"
@miticojo
miticojo / vagrant-setup.ps1
Last active April 4, 2017 07:33
Vagrant setup for Linux CentOS/Fedora/Debian/Ubuntu, OSX and Windows
$ErrorActionPreference="SilentlyContinue"
Stop-Transcript | out-null
$ErrorActionPreference = "Continue"
$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition
Start-Transcript -path $scriptPath\Win10_Ansible_Development_PC_Install.log -append
# elevate privileges to administrator to install chocolatey and other needed packages
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit }
@jlsherrill
jlsherrill / task_delete.md
Last active September 12, 2024 11:45
Delete a task

replace the ID with the task ID from Monitor > Tasks (not from the dynflow console)

For Katello 3.0 & Satellite 6.2:

foreman-rake foreman_tasks:cleanup FILTER='id=1cc6495d-f7ee-4011-9659-ea24ae9240f0' STATES=paused,stopped VERBOSE=true
@DeanCording
DeanCording / README.md
Last active December 4, 2021 07:31
ESP8266 OTA Firmware Upgrade Manager

This flow provides a tool for managing Over The Air firmware updates for ESP8266 Wifi SoC modules running the Arduino ESP8266 environment. It also supports Sonoff devices running the Tasmota firmware.

The ESP8266 is a very small, cheap, and reasonably powerful microcontroller with integrated WiFi. The OTA firmware upgrade process allows you to install these modules in location and have them automatically upgrade their firmware over WiFi.

The OTA upgrade library contacts a specified URL and passes the name and MD5 hash of the module's current firmware. This server implemented in this flow will compare the supplied MD5 hash against the one for the latest firmware and, if different, send the new firmware to the module. The server will uses either the module's MAC address or firmware name to identify the correct firmware file to send. The firmware can be specified in either the request URL or in the x-esp8266-version property in the

@DeanCording
DeanCording / Template_ESP8266.ino
Last active April 29, 2023 03:23
ESP8266 Arduino project template with optional OTA firmware update
/**
* ESP8266 project template with optional:
* - WiFi config portal - auto or manual trigger
* - OTA update - Arduino or web server
* - Deep sleep
* - Process timeout watchdog
*
* Copyright (c) 2016 Dean Cording <dean@cording.id.au>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
@dpino
dpino / ns-inet.sh
Last active April 24, 2026 14:31
Setup a network namespace with Internet access
#!/usr/bin/env bash
# set -x
if [[ $EUID -ne 0 ]]; then
echo "You must be root to run this script"
exit 1
fi
# Returns all available interfaces, except "lo" and "veth*".