Skip to content

Instantly share code, notes, and snippets.

@cemizm
cemizm / aqara_fp300.py
Last active December 13, 2025 21:51
Aqara FP300 Presence Sensor
from __future__ import annotations
from dataclasses import dataclass
from typing import Any, Final
from zigpy import types as t
from zigpy.quirks.v2 import QuirkBuilder, ReportingConfig
from zigpy.quirks.v2.homeassistant import EntityType, UnitOfTime, UnitOfLength
from zigpy.quirks.v2.homeassistant.binary_sensor import BinarySensorDeviceClass
from zigpy.quirks.v2.homeassistant.number import NumberDeviceClass
@luismts
luismts / GitCommitBestPractices.md
Last active December 13, 2025 21:49
Git Tips and Git Commit Best Practices

Git Commit Best Practices

Basic Rules

Commit Related Changes

A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.

Commit Often

Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.

@ritwikraha
ritwikraha / Pretraining-LLM.md
Last active December 13, 2025 21:43
Pretraining of Large Language Models

Pretraining


A Map for Studying Pre-training in LLMs

  • Data Collection
    • General Text Data
    • Specialized Data
  • Data Preprocessing
    • Quality Filtering
  • Deduplication
@sinceohsix
sinceohsix / Installing LiveContainer+Sidestore.md
Last active December 13, 2025 21:41
Installing LiveContainer+SideStore from start to finish.

A Guide to Setting up Sidestore + LiveContainer

Works on the latest iOS versions, including iOS 26 db8.

Hello r/sideloaded!

After the mass revocation wave I decided to make this guide to help people sideload apps using an alternative method. A method that is 100% revoke free, costs nothing, and requires a computer only one time (for initial setup)!

After following this guide you will not need to worry about the 3 app limit OR refreshing every 7 days. You will be able to install as many apps as you want and they should not ever expire. This is a completely free method.

Here is what we will go over in this guide:

@sundowndev
sundowndev / GoogleDorking.md
Last active December 13, 2025 21:40
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
@Cdaprod
Cdaprod / Pi_TFT_Console_Display.md
Created October 19, 2024 17:38
In this gist, is a **comprehensive, detailed guide** for installing and configuring the **1.14" 240x135 PiTFT** on your Raspberry Pi Zero W2 using the "hard way" method. This guide includes **advanced scripts** to automate the installation, handle updates, and ensure robust configuration management. By following these instructions, you'll set up…

In this gist, is a comprehensive, detailed guide for installing and configuring the 1.14" 240x135 PiTFT on your Raspberry Pi Zero W2 using the "hard way" method. This guide includes advanced scripts to automate the installation, handle updates, and ensure robust configuration management. By following these instructions, you'll set up your PiTFT to display the console seamlessly and maintain its functionality across kernel updates and different Raspberry Pi models.


Table of Contents

  1. Prerequisites
  2. System Preparation
  3. Setting Up Python Virtual Environment (Optional)
  4. Physical Installation of PiTFT
@intellectronica
intellectronica / 0.README.md
Last active December 13, 2025 21:38
My AGENTS.md for MDFlow

Here's my AGENTS.md (also linked from CLAUDE.md as @AGENTS.md) for hacking agentically on MDFlow recipes.

I have this in ~/.mdflow/, and the agents/recipes live in ~/.mdflow/agents/ and added to the path so that they can be invoked as commands.

With this I can use a coding agent like Claude Code or GitHub Copilot in VSCode and say something like:

> create a new agent using copilot that reviews all the code files in this directory as a poem
@luckygoswami
luckygoswami / disable_keyboard.reg
Created May 22, 2025 03:51
Enable/Disable Laptop Keyboard via Windows Registry
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt]
"Start"=dword:00000004
@einyx
einyx / iptables.sh
Last active December 13, 2025 21:37
Anti DDos kernel settings
### 1: Drop invalid packets ###
/sbin/iptables -t mangle -A PREROUTING -m conntrack --ctstate INVALID -j DROP
### 2: Drop TCP packets that are new and are not SYN ###
/sbin/iptables -t mangle -A PREROUTING -p tcp ! --syn -m conntrack --ctstate NEW -j DROP
### 3: Drop SYN packets with suspicious MSS value ###
/sbin/iptables -t mangle -A PREROUTING -p tcp -m conntrack --ctstate NEW -m tcpmss ! --mss 536:65535 -j DROP
### 4: Block packets with bogus TCP flags ###
@Klerith
Klerith / email_regexp.dart
Created March 3, 2023 20:50
Flutter / Dart - Email RegExp
final emailRegExp = RegExp(
r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$',
);