Skip to content

Instantly share code, notes, and snippets.

View goabonga's full-sized avatar

Chris goabonga

View GitHub Profile
### Keybase proof
I hereby claim:
* I am goabonga on github.
* I am goabonga (https://keybase.io/goabonga) on keybase.
* I have a public key ASCz2VQobogWTzVvNAe5NCQWdzmtAIagWt925K5utuvLyQo
To claim this, I am signing this object:
@goabonga
goabonga / main.py
Created January 24, 2024 17:05
Asynchronous Redis Pub/Sub Demonstration
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
This script demonstrates the use of the aredis library for asynchronous Redis operations in Python.
It includes functions for subscribing to and publishing messages on a Redis channel.
The script performs the following actions:
- Subscribes to a Redis channel named 'foo'.
- Publishes two messages to the 'foo' channel.
- Waits for and prints any messages received on the 'foo' channel.
@goabonga
goabonga / index.html
Created July 9, 2024 19:04
Where's My Meds?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pharmacy Finder</title>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAmjzsvuednFzcceM_OSckiMGMlnC-s4f0&libraries=drawing"></script>
<style>
#map {
height: 600px;
@goabonga
goabonga / cities.py
Last active April 10, 2025 16:23
chromadb & ollama & embedings & cities1000
import os
import zipfile
import httpx
import asyncio
import chromadb
from tqdm import tqdm
CHROMA_DIR = "./chroma"
EXTRACT_DIR = "./data"
ZIP_PATH = "cities1000.zip"
@goabonga
goabonga / main.py
Last active April 14, 2025 12:07
LLM Query System with ChromaDB and Sentence Transformers
import json
import sys
import re
from typing import Any, Dict, List, Mapping, Union
import numpy as np
import httpx
from chromadb.api.client import Client
from chromadb.api.models.Collection import Collection
from sentence_transformers import SentenceTransformer
@goabonga
goabonga / bootstrap_gcp_infra.sh
Created April 25, 2025 00:24
GCP Infra Bootstrap with Cookiecutter and Terragrunt Generator
#!/usr/bin/env bash
echo "build infra"
tmpfile=$(mktemp)
cat <<EOF > "$tmpfile"
default_context:
full_name: "Chris"
email: "goabonga@pm.me"
github_username: "goabonga"
@goabonga
goabonga / test_timing_attack.py
Created April 27, 2025 11:21
full-stack-fastapi-template authentication endpoint leaks user enumeration via response differences
import time
import requests
def measure_response_time(url: str, username: str, password: str) -> float:
data = {
"username": username,
"password": password
}
start = time.perf_counter()
response = requests.post(url, data=data)
qrlink() {
local url="$1"
qrencode -s 10 -o /tmp/qrcode.png "$url" && xdg-open /tmp/qrcode.png
}
@goabonga
goabonga / main.py
Created May 31, 2025 11:22
Automated Python Project Generator with Self-Healing Tests
import subprocess
import time
import re
import shutil
from pathlib import Path
import openai
from slugify import slugify
api_key = "sk-proj-..." # Replace with your OpenAI API key
@goabonga
goabonga / emails.txt
Last active July 8, 2025 16:49
Is your login route vulnerable to user enumeration?
notest
test
admin
john
chris
jane.doe
support
contact