Skip to content

Instantly share code, notes, and snippets.

View andreztz's full-sized avatar
🔨
High tech, low life.

André P. Santos andreztz

🔨
High tech, low life.
View GitHub Profile
@joanbm
joanbm / nvidia-470xx-fix-linux-6.4.patch
Created May 7, 2023 21:14
Tentative fix for NVIDIA 470.182.03 driver for Linux 6.4-rc1
From 4981428cda825b415eea60313f71bf386cc9f7e1 Mon Sep 17 00:00:00 2001
From: Joan Bruguera <joanbrugueram@gmail.com>
Date: Sat, 25 Feb 2023 10:57:26 +0000
Subject: [PATCH] Tentative fix for NVIDIA 470.182.03 driver for Linux 6.4-rc1
---
nvidia-drm/nvidia-drm-drv.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/nvidia-drm/nvidia-drm-drv.c b/nvidia-drm/nvidia-drm-drv.c
@zehnpaard
zehnpaard / grammar
Last active January 1, 2025 03:26
Python Implementation of Backtracking Recursive Descent Parser based loosely on Language Implementation Patterns
list : '[' elements ']';
elements : element (',' element)*;
element : NAME | assign | list | list_assign;
assign : NAME '=' NAME;
list_assign : list '=' list;
NAME : ('a'..'z' | 'A'..'Z')+;
@Jiab77
Jiab77 / create-DNS-over-TLS-bridge-with-pi-hole-unbound-and-stubby-on-ubuntu-server.md
Last active September 19, 2025 09:58
Few months ago, I've made a similar work but I wanted something a little more easier to manage. Please have a look at here for my previous work.

Create DNS-over-TLS bridge with Pi-hole, unbound and stubby on Ubuntu Server

Few months ago, I've made a similar work but I wanted something a little more easier to manage. Please have a look at here for my previous work.

This time, I'm gonna do pretty much the same thing but using Pi-hole as base then modify it to include unbound and stubby.

This way, I can use the power of Pi-hole with some additional security layers:

  • Recursive DNS check (unbound)
  • DNS-over-TLS (stubby)
@marc-queiroz
marc-queiroz / README.md
Last active August 16, 2025 01:04
IPv6 pfSense Copel Telecom

Configuração para pfSense 2.4.5 WAN IPv6 Copel Telecom

Um pouco de história. Para quem não sabe os endereços IPv4 foram esgotados, ou seja, todos 2^32 bits de endereços já tem dono. A maioria dos usuários domésticos e pequenos escritórios ganham no máximo um IPv4 por assinatura. No caso da Copel Telecom é um pouco diferente, pois como usuário você já recebe um IPv4 em NAT. O que isso significa? Que você não controla o tráfego de entrada e saída e alguns serviços podem ser prejudicados. O mais famoso dos serviços é a PSN, rede de jogos do console PlayStation da Sony.

Se você está decepcionado, não fique. O IPv4 foi substituído pelo IPv6, veja Wiki IPv6, que possui 2^128 bits de endereço. A Copel Telecom aposta no IPv6 como novo padrão, não apenas porque chegou tarde na divisão dos IPv4s, mas porque os IPv4s vão deixar de ser usados cedo ou tarde.

Modem Hauwei da Copel Telecom em modo bridge

Se você chegou até aqui, você já sabe que o modo bridge transfere parte a

@darkr4y
darkr4y / httpsrv.py
Last active November 13, 2024 15:18
python simple http server with upload & download
#!/usr/bin/env python
"""Extend Python's built in HTTP server to save files
curl or wget can be used to send files with options similar to the following
curl -X PUT --upload-file somefile.txt http://localhost:8000
wget -O- --method=PUT --body-file=somefile.txt http://localhost:8000/somefile.txt
__Note__: curl automatically appends the filename onto the end of the URL so
import builtins
input_values = []
print_values = []
def mock_input(s):
print_values.append(s)
return input_values.pop(0)
@lohhans
lohhans / README-PTBR.md
Last active May 29, 2026 03:01 — forked from PurpleBooth/README-Template.md
Um modelo para fazer um bom README.md

Título do projeto

Um parágrafo da descrição do projeto vai aqui

🚀 Começando

Essas instruções permitirão que você obtenha uma cópia do projeto em operação na sua máquina local para fins de desenvolvimento e teste.

Consulte Implantação para saber como implantar o projeto.

@anthonyeden
anthonyeden / simplistic-ffmpeg-streaming.py
Created May 28, 2018 11:46
Sending FFmpeg output to HTTP, via Python's Flash
"""
Streaming FFmpeg to HTTP, via Python's Flask.
This is an incredibly simple example, which will yield issues due to inconsistant input and output rates.
If you're going to use this, VLC works okay as a client.
You really need to move FFmpeg into a separate thread, which should help stream audio more consistantly to the HTTP client.
Example by Anthony Eden (https://mediarealm.com.au)
"""
from flask import Flask
@ErikFontanel
ErikFontanel / filter-youtube-domains.sh
Last active March 11, 2026 21:34
Pi-hole Youtube ad blocking
#!/bin/sh
# This script will fetch the Googlevideo ad domains and append them to the Pi-hole block list.
# Run this script daily with a cron job (don't forget to chmod +x)
# More info here: https://discourse.pi-hole.net/t/how-do-i-block-ads-on-youtube/253/136
# File to store the YT ad domains
FILE=/etc/pihole/youtube.hosts
# Fetch the list of domains, remove the ip's and save them
curl 'https://api.hackertarget.com/hostsearch/?q=googlevideo.com' \
@naamancampbell
naamancampbell / dashboard.html
Last active October 19, 2019 21:38
Display Multiple Strava Activity Maps in Flask Template
{% for activity in activities %}
<div class="post">
{% if activity.strava_data['map']['polyline'] is not none %}
<div id="map_{{ activity.id }}" class="img-fluid" style="height: 300px;"></div>
{% endif %}
{# other activity data #}
</div>
{% endfor %}