Skip to content

Instantly share code, notes, and snippets.

View wfn's full-sized avatar

kostas wfn

View GitHub Profile
@tarruda
tarruda / claude-code-repo-init.md
Created August 11, 2025 17:57
Claude code repository initialization

System Prompt

You are Claude Code, Anthropic's official CLI for Claude.

You are an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user.

IMPORTANT: Assist with defensive security tasks only. Refuse to create, modify, or improve code that may be used maliciously. Allow security analysis, detection rules, vulnerability explanations, defensive tools, and security documentation. IMPORTANT: You must NEVER generate or guess URLs for the user unless you are confident that the URLs are for helping the user with programming. You may use URLs provided by the user in their messages or local files.

If the user asks for help or wants to give feedback inform them of the following:

@igoptx
igoptx / upgrade-firefly.sh
Created July 19, 2025 11:10
bash script to update firefly instalation easly (Self Managed)
#!/bin/bash
# === Auto mode if --auto argument is passed ===
AUTO_MODE=false
if [[ "$1" == "--auto" ]]; then
AUTO_MODE=true
shift
fi
# === Start log ===
@vgururao
vgururao / contraptionsBookClub.md
Last active July 14, 2025 14:08
Venkat's contraptions book club notes

Venkat's notes on contraptions book club

Goal is to compile some brief notes to feed into an LLM at the end of the year.

City of Fortune

  • blah
  • blah

To be cut and paste from substack threads

@jwbee
jwbee / jq.md
Last active July 15, 2025 12:12
Make Ubuntu packages 90% faster by rebuilding them

Make Ubuntu packages 90% faster by rebuilding them

TL;DR

You can take the same source code package that Ubuntu uses to build jq, compile it again, and realize 90% better performance.

Setting

I use jq for processing GeoJSON files and other open data offered in JSON format. Today I am working with a 500MB GeoJSON file that contains the Alameda County Assessor's parcel map. I want to run a query that prints the city for every parcel worth more than a threshold amount. The program is

@ddyykk
ddyykk / backup_firefly_docker.md
Last active November 12, 2025 10:24
The scripts used for backup and restore data in Firefly III docker containers. Steps are in the .md file.

Usage Instructions:

  1. Backup Script (backup_firefly_docker.sh):

    • Run the script: ./backup_firefly_docker.sh
    • Enter the database password when prompted.
    • The script will create a backup of the database and uploads directory, compress it, and verify its contents. The files will be in the directory of your current path. (The path when you run the script)
    • The backup file and its checksum will be saved in the firefly_backups directory.
  2. Restore Script (restore_firefly_docker.sh):

@tarruda
tarruda / micro_events.py
Last active October 12, 2025 18:34
Micro event loop library to teach the basic concepts of python coroutines and how event loop libraries might be implemented
"""
A micro event loop library implementation from scratch.
This library provides a minimal but feature-complete asynchronous event loop
implementation for educational purposes. It demonstrates the core concepts of
asynchronous programming including:
- Task scheduling and management
- I/O multiplexing with non-blocking sockets
- Timeouts and sleep functionality
@danielchasehooper
danielchasehooper / inline_shader.js
Created February 4, 2025 20:33
the code that creates the interactive shader editor for danielchasehooper.com
"use strict";
// I'm posting at the request of this lobsters comment: https://lobste.rs/s/ycbpnz/animating_rick_morty_one_pixel_at_time#c_wonfh3
// this code sets up the live shader editor on http://danielchasehooper.com/posts/code-animated-rick/
(function() {
let gl;
let program;
let cached_vertex_shader;
@hackermondev
hackermondev / research.md
Last active November 16, 2025 09:13
Unique 0-click deanonymization attack targeting Signal, Discord and hundreds of platform

hi, i'm daniel. i'm a 15-year-old high school junior. in my free time, i hack billion dollar companies and build cool stuff.

3 months ago, I discovered a unique 0-click deanonymization attack that allows an attacker to grab the location of any target within a 250 mile radius. With a vulnerable app installed on a target's phone (or as a background application on their laptop), an attacker can send a malicious payload and deanonymize you within seconds--and you wouldn't even know.

I'm publishing this writeup and research as a warning, especially for journalists, activists, and hackers, about this type of undetectable attack. Hundreds of applications are vulnerable, including some of the most popular apps in the world: Signal, Discord, Twitter/X, and others. Here's how it works:

Cloudflare

By the numbers, Cloudflare is easily the most popular CDN on the market. It beats out competitors such as Sucuri, Amazon CloudFront, Akamai, and Fastly. In 2019, a major Cloudflare outage k

@marcelofern
marcelofern / converter.c
Created August 26, 2024 09:39
Website converter (.md -> .html)
/* converter.c
*
* This code converts `.md` files into `.html` files.
*
* The main use is to write a static website in `.md` files, and then run this
* program to convert it to `.html`
*
* The program relies on the following variables:
*
* - INPUT_FOLDER: full path of the website with `.md` files.
@lbpierre
lbpierre / pikabot-s2-next-stage-execution.c
Created May 7, 2024 15:55
Pikabot cleaned function in charge of executing the last stage.
void execute_next_stage()
{
_IMAGE_DOS_HEADER *decompressed_buffer; // edi
IMAGE_NT_HEADERS *lfanew; // esi
_IMAGE_NT_HEADERS *v2; // esi
_BYTE *v3; // ebx
char *v4; // ebx
int v5; // ebx
int Heap; // [esp+C8h] [ebp-C8h]
int i; // [esp+100h] [ebp-90h]