Skip to content

Instantly share code, notes, and snippets.

@AncientJames
AncientJames / pixelmap.py
Created February 28, 2025 02:14
This is the TPC I used to pixel map the Fibrovisor ( https://www.youtube.com/watch?v=zz59e1wWyVc ). It uses rgbmatrix ( https://github.com/hzeller/rpi-rgb-led-matrix ) to light up one pixel at a time, and opencv to record the position of the brightest spot in the frame.
#!/usr/bin/env python
import time
import sys
import getpass
from rgbmatrix import RGBMatrix, RGBMatrixOptions
import cv2 as cv
options = RGBMatrixOptions()
options.hardware_mapping = 'regular'
@mp035
mp035 / tk_scroll_demo.py
Last active March 2, 2025 09:02
A simple scrollable frame class for tkinter, including example usage.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import tkinter as tk
import platform
# ************************
# Scrollable Frame Class
# ************************
@fawazahmed0
fawazahmed0 / breach.txt
Last active March 2, 2025 08:59
Email and password breach collection list
# Please Note, I am sharing this, hoping this will be used for good public use, such as data analysis, penetration testing etc
# These links are already available all over the internet
# Also Note, Trying to login into someone else's account without their permission is unethical and illegal
# Collection 1
magnet:?xt=urn:btih:B39C603C7E18DB8262067C5926E7D5EA5D20E12E&dn=Collection%201&tr=udp%3a%2f%2ftracker.coppersurfer.tk%3a6969%2fannounce&tr=udp%3a%2f%2ftracker.leechers-paradise.org%3a6969%2fannounce&tr=http%3a%2f%2ft.nyaatracker.com%3a80%2fannounce&tr=http%3a%2f%2fopentracker.xyz%3a80%2fannounce
# Collection 2-5 & Antipublic
magnet:?xt=urn:btih:D136B1ADDE531F38311FBF43FB96FC26DF1A34CD&dn=Collection%20%232-%235%20%26%20Antipublic&tr=udp%3a%2f%2ftracker.coppersurfer.tk%3a6969%2fannounce&tr=udp%3a%2f%2ftracker.leechers-paradise.org%3a6969%2fannounce&tr=http%3a%2f%2ft.nyaatracker.com%3a80%2fannounce&tr=http%3a%2f%2fopentracker.xyz%3a80%2fannounce
@willccbb
willccbb / grpo_demo.py
Last active March 2, 2025 08:57
GRPO Llama-1B
# train_grpo.py
#
# See https://github.com/willccbb/verifiers for ongoing developments
#
import re
import torch
from datasets import load_dataset, Dataset
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import LoraConfig
from trl import GRPOConfig, GRPOTrainer
@topherPedersen
topherPedersen / nestenum.ts
Created June 7, 2021 15:37
Nested "Enums" in TypeScript
enum Foo {
A = "ActivityCode.Foo.A",
B = "ActivityCode.Foo.B",
C = "ActivityCode.Foo.C",
}
enum Bar {
A = "ActivityCode.Bar.A",
B = "ActivityCode.Bar.B",
C = "ActivityCode.Bar.C",
Prerequistes
Linux
- https://www.youtube.com/live/EUu1E_YKGTw?si=oQAfgbMr5PLr5JPr
- https://www.youtube.com/watch?v=gd7BXuUQ91w&t=87s
===========================================================================================
Networking
- https://www.youtube.com/watch?v=rv3QK2UquxM
- https://youtube.com/playlist?list=PLw6kwOJVj3MbMZ8B72ZgUryj8OSETC0ds&si=cfRUsVOUtCcDgPOp
- https://youtu.be/J4Myf0UNkLI?si=ZU8mDF5wlDphyEWH
Kubernetes Networking
@hellokaton
hellokaton / next.config.ts
Last active March 2, 2025 08:50
解决国内 nextjs 三方登录等网络问题
const isDev = process.env.NODE_ENV === "development";
if (isDev) {
require("./proxy-setup");
}
@LKS90
LKS90 / cheatsheet.md
Last active March 2, 2025 08:47
Cheatsheet for LaTex, using Markdown for markup. I use this with atom.io and markdown-preview-plus to write math stuff

Description

Cheatsheet for LaTex, using Markdown for markup. I use this with atom.io and 📦markdown-preview-plus to write math stuff. 📦keyboard-localization is necessary when using an international layout (like [swiss] german).

Further Reference and source: ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf

Example expressions / functions

@LunarLambda
LunarLambda / vim-indentation-guide.md
Created September 30, 2019 22:43
A Best Effort Guide to Vim's Indentation Settings.

Vim 'Indentation Hell': A Best Effort Guide

I love Vim. But it isn't perfect, unfortunately.
And one part that is particularly confusing when setting up for the first time is indentation.
This guide strives to cover what options are relevant, what they do, how they interact, and how to set them up for most popular indentation styles.

Meet The Cast

Vim has 5 options relating to (manual) indentation:

@allenk
allenk / deepclean.cmd
Last active March 2, 2025 08:40
ASUS Software Clean Up Tool
@echo off
:: ------------------------------------------------------------------------------------------------------------
:: Clean Up ASUS All
:: ------------------------------------------------------------------------------------------------------------
:: The tool helps to clean up all ASUS software from system
:: ------------------------------------------------------------------------------------------------------------
:: Before running the tools,
:: 1. Complete backup your system.
:: 2. Disable ASUS Apps from BIOS (MyASUS and Armoury)
:: 3. Run ASUS remove tools (Armoury Crate Uninstall Tool.exe, or geek_uninstall.exe).