Skip to content

Instantly share code, notes, and snippets.

@todbot
todbot / eyeballs_dual_gc9a01.py
Last active April 24, 2025 06:28
dual display GC9A01 round TFT LCDs with creepy eyeball animation in CircuitPython
# eyeballs_dual_gc9a01.py - dual display GC9A01 round TFT LCDs with creepy eyeball animation
# 17 May 2022 - @todbot / Tod Kurt
#
# requires recompiled CircuitPython with "#define CIRCUITPY_DISPLAY_LIMIT (2)" in "mpconfigboard.h"
#
import time, math, random
import board, busio
import displayio, terminalio
import gc9a01
@davidteren
davidteren / nerd_fonts.md
Last active April 24, 2025 06:26
Install Nerd Fonts via Homebrew [updated & fixed]
@crypt0rr
crypt0rr / fix.md
Last active April 24, 2025 06:26
Intel e1000e fix - Proxmox

Fix Intel e1000e error

Please note - you may want to validate whether the options used affect your setup.

Create a new service file.

nano /etc/systemd/system/disable-offloading.service
@Klerith
Klerith / instalaciones-nestjs.md
Last active April 24, 2025 06:24
Instalaciones recomendadas para el curso de Nest.js
@xen0n
xen0n / check-new-world.tiny.s
Last active April 24, 2025 06:24
Tiny helper checking for LoongArch new world UAPI
# SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#
# how to build this:
#
# $ as -o check-new-world.tiny.o check-new-world.tiny.s
# $ ld check-new-world.tiny.o -o check-new-world.tiny.tmp
# $ objcopy -O binary --only-section=.blob ./check-new-world.tiny.tmp ./check-new-world.tiny
.section ".blob", "aw", @progbits
@mattia-beta
mattia-beta / ddos.conf
Last active April 24, 2025 06:22
IPtables DDoS Protection for VPS
### 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 ###
@harry-cpp
harry-cpp / NotAValidScript.sh
Created April 24, 2019 17:10
MonoGame inside the Web Browser
# Quck setup guide for MonoGame on Web
# Install the template
dotnet new --install MonoGame.Template.Bridge.CSharp
# Generate the project
dotnet new mgbridge
# Build the project
msbuild
@b0gdanw
b0gdanw / Disable-Sequoia-Bloatware.sh
Last active April 24, 2025 06:20
Disable Sequoia Bloatware
#!/bin/zsh
# WARNING! The script is meant to show how and what can be disabled. Don’t use it as it is, adapt it to your needs.
# Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
# Disabling unwanted services on macOS Big Sur (11), macOS Monterey (12), macOS Ventura (13), macOS Sonoma (14) and macOS Sequoia (15)
# Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
# Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist, disabled.501.plist
# To revert, delete /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist and reboot; sudo rm -r /private/var/db/com.apple.xpc.launchd/*
# user
@aashari
aashari / 00 - Cursor AI Prompting Rules.md
Last active April 24, 2025 06:15
Cursor AI Prompting Rules - This gist provides structured prompting rules for optimizing Cursor AI interactions. It includes three key files to streamline AI behavior for different tasks.

Cursor AI Prompting Framework Usage Guide

This guide explains how to use the structured prompting files (core.md, refresh.md, request.md) to optimize your interactions with Cursor AI, leading to more reliable, safe, and effective coding assistance.

Core Components

  1. core.md (Foundational Rules)
    • Purpose: Establishes the fundamental operating principles, safety protocols, tool usage guidelines, and validation requirements for Cursor AI. It ensures consistent and cautious behavior across all interactions.
    • Usage: This file's content should be persistently active during your Cursor sessions.