Skip to content

Instantly share code, notes, and snippets.

View wainejr's full-sized avatar

Waine Junior wainejr

View GitHub Profile
@wainejr
wainejr / make_naca0012_stl.py
Created June 14, 2026 01:41
Nassu validation #677: NACA 0012 wing geometry - parametric generator (analytic, sharp/TMR TE) + ready-to-use ASCII STL (chord=1, span=1, 4108 tris, watertight)
#!/usr/bin/env python3
"""Generate a watertight NACA 0012 wing STL (analytic, sharp trailing edge).
The thickness uses the closed-TE ("sharp") NACA 0012 coefficient (-0.1036),
matching the NASA Turbulence Modeling Resource (TMR) airfoil definition, so the
geometry is consistent with the Cl/Cp/Cf reference data used for validation.
The airfoil is generated at zero angle of attack with unit chord; rotate to the
target alpha and scale to the target chord (in lattice units) in the case config.
Cross-section is convex, so end caps are a centroid triangle fan (watertight).
@wainejr
wainejr / pointers.c
Created February 15, 2025 16:42
Arrays are not pointers
#include <stdio.h>
#include <stdlib.h>
int main(){
int array[3][4];
int* pointer;
int** double_pointer;
int* random_allocation;
pointer = (int*) malloc(12 * sizeof(int));
@wainejr
wainejr / .config_qtile_autostart.sh
Last active November 15, 2024 15:54
Linux setup files
#!/bin/bash
# From root in repo, run
# chmod +x .config/qtile/autostart.sh
# ln -s $(pwd)/.config/qtile/autostart.sh ~/.config/qtile/autostart.sh
# to link autostart with this
# Function to check if a process is already running and run it if not
function run {
if ! pgrep -x $(basename $1 | head -c 15) 1>/dev/null;
@wainejr
wainejr / scrpy_tablet_cam.md
Created October 1, 2024 23:31
Scrcpy Commands + example

Setup

https://www.youtube.com/watch?v=pchJpGqq2QA

  1. Instalar scrcpy no PC
  2. Instalar os drivers adb no PC (para debuggin de android)
  3. Ativar modo desenvolvedor no tablet
  4. Conectar USB do tablet no PC
    1. Aceitar permissão para alterações
    2. Rodar adb tcpip 5555 (para IP)
@wainejr
wainejr / easy_effects.json
Created October 1, 2024 23:26
Easy Effects Config (male, stream, record videos, pt-br)
{
"input": {
"blocklist": [],
"compressor#0": {
"attack": 5.0,
"boost-amount": 6.0,
"boost-threshold": -72.0,
"bypass": false,
"dry": -100.0,
"hpf-frequency": 10.0,