Skip to content

Instantly share code, notes, and snippets.

View HudsonAfonso's full-sized avatar
:octocat:
Focusing

Hudson Afonso HudsonAfonso

:octocat:
Focusing
View GitHub Profile
@ipenywis
ipenywis / cursor-memory-bank-rules.md
Last active December 9, 2025 14:06
Cursor Memory Bank

Cursor's Memory Bank

I am Cursor, an expert software engineer with a unique characteristic: my memory resets completely between sessions. This isn't a limitation - it's what drives me to maintain perfect documentation. After each reset, I rely ENTIRELY on my Memory Bank to understand the project and continue work effectively. I MUST read ALL memory bank files at the start of EVERY task - this is not optional.

Memory Bank Structure

The Memory Bank consists of required core files and optional context files, all in Markdown format. Files build upon each other in a clear hierarchy:

flowchart TD
@shirozatou
shirozatou / Android.md
Last active October 7, 2025 21:03
Use ML Kit's barcode scanning API without Firebase dependencies or datatransport stuff

Use ML Kit's barcode scanning API without Firebase dependencies or datatransport stuff

Gradle

Before

dependencies {
    implementation("com.google.mlkit:barcode-scanning:17.3.0")
}
@cGandom
cGandom / RaspberryPi4-qemu.md
Last active November 27, 2025 16:14
Emulating Raspberry Pi 4 with Qemu

Emulating Raspberry Pi 4 with Qemu

Just a quick update before we dive in: what we're actually doing here is running Raspberry Pi OS (64-bit) on a QEMU virtual ARM setup. This isn't full-blown hardware emulation of the Raspberry Pi 4, but more about creating a virtual environment for the OS. It doesn't mimic all the specific hardware features of the Pi 4, but it's pretty useful and great for general testing. I turned to this solution mainly to extract a modified sysroot from the Raspberry Pi OS, something not readily available in other resources. For those looking into detailed emulation of the actual Raspberry Pi 4's hardware in QEMU, check out this link for the latest updates: https://gitlab.com/qemu-project/qemu/-/issues/1208.

Hope it helps! :D

Shortcomings: No GUI yet, only console.

Steps

@abhigyantrips
abhigyantrips / docusaurus-css-variables.css
Last active October 22, 2025 10:41
This is a list of all CSS variables for Docusaurus (@docusaurus/preset-classic), which uses Infima (https://infima.dev/) as its styling framework.
/*
Docusaurus CSS Variables.
I'm making this since I wanted to customize my Docusaurus site theme, but couldn't find a proper list of all Infima CSS variables
the static site generator uses. Thus, I basically copied the root of my site's CSS (along with other vars I found), and made a list
of them that categorizes the vars.
TABLE OF CONTENTS:
@rydmike
rydmike / analysis_options.yaml
Last active December 10, 2025 13:59
RydMike lints v2.6.0 - Personal preferences and starting point for Dart & Flutter linter rules setup.
# RydMike LINTER Preferences v2.6.0
#
# Get this file here: https://gist.github.com/rydmike/fdb53ddd933c37d20e6f3188a936cd4c
#
# We include and activate all_lint_rules, then below we disable the not used or desired ones.
# You can find a list of all lint rules to put in your all_lint_rules.yaml file here:
# https://dart.dev/tools/linter-rules/all
#
# This version is updated for Flutter 3.38 and Dart 3.10.
#
@mattbishop
mattbishop / crc32c.sql
Last active March 16, 2025 13:46
CRC32C calculator for Postgresql in PL/PGSQL
-- crc32c https://tools.ietf.org/html/rfc3385#section-4.1
-- Table-based crc32 (not exactly right algorithm, but a good pattern to follow)
-- https://gist.github.com/cuber/bcf0a3a96fc9a790d96d
-- Google-created CRC table
-- https://github.com/googlearchive/crc32c-java/blob/master/src/com/google/cloud/Crc32c.java
CREATE OR REPLACE FUNCTION update_crc32c(src TEXT,
crc BIGINT DEFAULT 0)
RETURNS BIGINT
LANGUAGE plpgsql IMMUTABLE PARALLEL SAFE AS
$$
@miditkl
miditkl / raspberry_python.sh
Last active December 13, 2023 09:30 — forked from vbe0201/raspberry_python.sh
A shell script for installing Python 3.10.2 on your Raspberry Pi.
#!/bin/bash
# A bash script for installing Python 3.10.2 on your Raspberry Pi.
# (c) 2022 Valentin B. / Midian T. E.
#
# Open your terminal and type the following command:
# sudo wget https://gist.githubusercontent.com/realSnosh/cfe29370d2205bd1ad296e7bc7c9b9ea/raw/raspberry_python.sh && chmod +x raspberry_python.sh && ./raspberry_python.sh
sudo apt-get update -y
sudo apt-get upgrade
@nischalshrestha
nischalshrestha / ambient1.rb
Created May 10, 2020 04:51
Sonic Pi: Ambient 1
##| Ambient 1
with_fx :reverb, room: 0.8, mix: 0.6 do
live_loop :deep_saws do
use_synth :saw
amp = 0
release = rrand_i(5, 8)
attack = rrand(0.8, 3.0)
with_fx :lpf, cutoff: 80 do
@StevenACoffman
StevenACoffman / go-sql.md
Last active October 5, 2020 14:18
Go SQL

Database Environments

A schema contains a group of tables. A database contains a group of schemas.

In prod, we use a cloudsql PostgreSQL instance. The reports DB is for prod only. It's presence should be a gatekeeper to prevent destructive teardowns.

Everywhere else, we assume a local PostgreSQL running on port 5432 with two existing databases. The khan_test DB is for integration tests. The khan_dev DB is for local development.

@fgatti675
fgatti675 / search_fab_transition.dart
Last active July 8, 2024 11:24
Flutter transition from FAB to navigator page
import 'dart:async';
import 'package:flutter/material.dart';
final routeObserver = RouteObserver<PageRoute>();
final duration = const Duration(milliseconds: 300);
void main() => runApp(MaterialApp(
home: HomePage(),
navigatorObservers: [routeObserver],