Skip to content

Instantly share code, notes, and snippets.

@flexiondotorg
flexiondotorg / starship.toml
Created December 2, 2024 16:19
A delightful Catppuccin theme for Starship
add_newline = false
command_timeout = 1000
format = "[](surface1)$os[](bg:surface2 fg:surface1)$username$sudo[](bg:overlay0 fg:surface2)$hostname[](bg:mauve fg:overlay0)$directory[](fg:mauve bg:peach)$c$dart$dotnet$elixir$elm$erlang$golang$haskell$haxe$java$julia$kotlin$lua$nim$nodejs$rlang$ruby$rust$perl$php$python$scala$swift$zig$package$git_branch[](fg:peach bg:yellow)$git_status[](fg:yellow bg:teal)$container$direnv$nix_shell$cmd_duration$jobs$shlvl$status$character"
palette = "catppuccin_mocha"
[c]
format = "[ $symbol]($style)"
style = "fg:base bg:peach"
symbol = ""
@hackermondev
hackermondev / research.md
Last active January 23, 2025 14:22
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

@beached
beached / C++ normal operators.md
Last active January 23, 2025 14:19
A list of the normal signatures of C++ operators that allow overloading

C++ Operator Signatures

This is a list of C++ operators that can be overloaded and their normal signatures(a.k.a what an int would do). The order is the preffered order to use them(The first one listed is often preffered)

Arithmetic

operator+ addition

  • free function -> T operator+( T const & lhs, T const & rhs )
  • member function -> T operator+( T const & rhs ) const

operator+ unary plus

  • member function -> T operator+( ) const
import asyncio
import os
from contextlib import asynccontextmanager
import sqlalchemy as sa
from dependency_injector import providers
from dependency_injector.containers import DeclarativeContainer
from dependency_injector.wiring import Provide, inject
from fastapi import Depends, FastAPI
from sqlalchemy.ext.asyncio import (
@leommoore
leommoore / file_magic_numbers.md
Last active January 23, 2025 14:19
File Magic Numbers

File Magic Numbers

Magic numbers are the first bits of a file which uniquely identify the type of file. This makes programming easier because complicated file structures need not be searched in order to identify the file type.

For example, a jpeg file starts with ffd8 ffe0 0010 4a46 4946 0001 0101 0047 ......JFIF.....G ffd8 shows that it's a JPEG file, and ffe0 identify a JFIF type structure. There is an ascii encoding of "JFIF" which comes after a length code, but that is not necessary in order to identify the file. The first 4 bytes do that uniquely.

This gives an ongoing list of file-type magic numbers.

Image Files

@DanielArnett
DanielArnett / vive-tracker-ubuntu-instructions.md
Last active January 23, 2025 14:16
How to use the HTC Vive Trackers in Ubuntu using Python 3.6.

This tutorial will guide you through the setup of the HTC Vive Tracker in Python 3.6 on Ubuntu 14.04.

Prerequesites

Up to date graphics drivers

x86 architecture

SteamVR requires >4GB disk space

@emilianavt
emilianavt / BestVTuberSoftware.md
Last active January 23, 2025 14:16
Best VTuber Software

Best VTuber software

This is a list of the most commonly used and relevant vtubing software. The "best" will always be subjective and depend on your specific requirements. Overall, the information in this list is as accurate as I could figure it out, but there might be errors or some details might become out of date. If you find anything that needs to be corrected, please let me know. You can also note it in a comment.

Additional explanations:

  • iPhone means that an iPhone is basically required
  • iFacialMocap support means that tracking data can be received from the iFacialMocap iPhone app
  • VMC protocol means that the application can send and/or receive tracking data from other VMC protocol capable applications, allowing the combination of multiple tracking methods (e.g. VSeeFace receiving VR tracking from Virtual Motion Capture and iPhone/ARKit face tracking from Waidayo)
  • Tobii means that the Tobii eye tracker is supported
@cookienommienom
cookienommienom / bot.py
Created November 30, 2024 08:26
Impressive ChatGPT o1 output related to subscription management with Discord.py and FastAPI
import discord
from discord.ext import commands
from sqlalchemy import create_engine, Column, Integer, String, Boolean
from sqlalchemy.orm import sessionmaker, declarative_base
import stripe
from fastapi import FastAPI, Request, HTTPException
import uvicorn
import asyncio
# Set up the database
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active January 23, 2025 14:12
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@aliirz
aliirz / demo.py
Created December 6, 2024 20:57
k commons
from fastapi import FastAPI, HTTPException
from transformers import GemmaForCausalLM, GemmaTokenizer
import torch
from typing import Dict, List
import sqlite3
import asyncio
import json
from datetime import datetime
class LocalGemmaProcessor: