Skip to content

Instantly share code, notes, and snippets.

View johnnypea's full-sized avatar
🏠
Working from home

Ján Bočínec johnnypea

🏠
Working from home
View GitHub Profile
@CaptainCrouton89
CaptainCrouton89 / example-trace.txt
Last active September 17, 2025 08:34
An example of what my agent will do. Note that it queries db itself, then makes plan. Also note that after the plan, a hook instructs it in how to parallelize the plan. It then uses custom implementor agents to execute the plan. This is a pretty sizable feature, and it's getting one-shot perfectly, and quickly.
I'll help you implement a writing quirks feature that generates unique stylistic elements before
outline creation. Let me first understand the current structure and then create a plan.
⏺ Let me investigate the current codebase structure to understand how outline and plot generation
work.
⏺ Read(src/generation/outline/newOutline.ts)
⎿ Read 237 lines (ctrl+r to expand)
⏺ sql - describe-table (MCP)(tableName: "sequences", includeConstraints: true, includeSampleRows: true)
@tomlarkworthy
tomlarkworthy / isomorphic-git-cors-proxy.js
Last active October 30, 2025 05:04
isomorphic git proxy on Cloudflare Workers
addEventListener('fetch', e => e.respondWith(handle(e.request)))
const ok = (req,u)=>{
const q=u.searchParams
return req.method==='OPTIONS'||
(req.method==='GET' && u.pathname.endsWith('/info/refs') &&
['git-upload-pack','git-receive-pack'].includes(q.get('service')))||
(req.method==='POST'&&u.pathname.endsWith('git-upload-pack') &&
req.headers.get('content-type')==='application/x-git-upload-pack-request')||
(req.method==='POST'&&u.pathname.endsWith('git-receive-pack') &&
@joperezr
joperezr / Auth.md
Last active September 11, 2025 08:19
Authentication & Authorization in ASP.NET Core

Deep Dive into ASP.NET Core Authentication, Authorization, and Identity

Authentication vs. Authorization vs. Identity

Authentication is the act of verifying who a user is. When a user successfully authenticates (for example, by entering the correct credentials or token), the application establishes the user’s identity (often represented by a ClaimsPrincipal in ASP.NET Core) (Introduction to authorization in ASP.NET Core | Microsoft Learn). In other words, authentication answers “Who are you?” and results in an identity that the app can use. By contrast, Authorization is about what the authenticated user is allowed to do or access. It answers “What are you allowed to do?” ([Introduction to authorization in ASP.NET Core | Microsoft Learn](https://learn.microsoft.com/en-us/aspnet/core/securit

@mdbraber
mdbraber / save-safari-pdf.swift
Last active August 8, 2025 13:08
Save Safari website as PDF (with syncing cookies)
#!/usr/bin/swift
@preconcurrency import WebKit
@preconcurrency import Foundation
@preconcurrency import Darwin
// Disable everything written to stderr
freopen("/dev/null", "w", stderr)
struct Cookie {
@ttscoff
ttscoff / pullremote.sh
Last active February 3, 2025 19:53
remote git pull script
#!/bin/bash
# Remote host is the first argument
HOST=$1
# Remote directory is a mirror of the local directory
DIR=$(pwd)
# SSH to the host and run the pull script
ssh $HOST "~/scripts/remotepull.sh '$DIR'"
# Sync Build notes not stored in git
@mikeslattery
mikeslattery / .idea-lazy.vim
Last active December 3, 2025 11:43
LazyVim mappings for Jetbrains IDEs
" ~/.idea-lazy.vim
" LazyVim mappings for Jetbrains IDEs
" Required plugins. https://plugins.jetbrains.com/bundles/7-ideavim-bundle
" IDEAVim
" Which-Key
" IdeaVim-Sneak
" To install, add this to the top of your ~/.ideavimrc:
@platu
platu / ovs+incus+sharedvlans-setup.md
Last active December 2, 2025 21:59
Host Incus containers networked on VLANs in the physical world

Host Incus containers networked on VLANs in the physical world

The installation process begins with a Debian trixie base installation on the host system or virtual machine.

It is important to note that this system is networked on a trunk mode port, which allows for the sharing of VLANs between the host or virtual machine and other devices on the networks.

Target topology

@cajuncoding
cajuncoding / SystemTextJsonNodeMergeExtensions.cs
Last active October 18, 2025 21:50
Simple Merge process for JsonNode using System.Text.Json
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using System.Text.Json.Nodes;
namespace CajunCoding
{
public static class SystemTextJsonMergeExtensions
{
@kennypete
kennypete / navigating_the_modes_of_Vim.md
Created April 18, 2024 20:46
Navigating the modes of Vim

Navigating the modes of Vim

This diagram illustrates navigating through Vim’s modes. It was built factoring Vim 9 (i.e., all its modes, including up to two new modes, cr and cvr, in November 2023). Information about the state() and 'showmode' is provided too.

SVG version

Some features are only available in the SVG version. It is not provided directly from within this gist’s files because SVGs do not always play nicely in GitHub (particularly, refusing to display embedded fonts).

The SVG version includes hover text help, which shows pertinent information about the underlying key, command, mode, etc.

@selfawaresoup
selfawaresoup / uconsole.md
Last active November 28, 2025 04:17
Notes for Clockwork uConsole setup

uConsole Notes

Batteries

I use two XTAR 16850-3500 cells and I get about 8h of active usage out of them.

Get GNOME Shell and GDM3

sudo apt install gnome-shell gdm3