Skip to content

Instantly share code, notes, and snippets.

View pythrick's full-sized avatar

Patrick Rodrigues pythrick

View GitHub Profile
@akshayverma1
akshayverma1 / BootCamp Driver Installation Guide.md
Last active September 7, 2025 22:07
How to get Apple peripherals to work on a Windows PC

How to get Apple peripherals to work on a Windows PC

Published: 8 February, 2024

This guide will help you get your Apple Studio Display, ProDisplay XDR, Magic Keyboard, Magic Mouse, Magic Trackpad, etc. to work with a Windows 11 PC that doesn’t have native support for BootCamp. I wrote this guide because most methods that I could find elsewhere were either out of date, had sketchy download links, had compatibility issues with Windows 11 version 23H2, didn't support Windows Precision Touchpad, didn’t support all the modules in the BootCamp app, or didn’t explain how to get the most up to date Apple official drivers.

Please note that to get Apple displays to work will require either a thunderbolt output from your graphics card or the right DisplayPort to USB-C cable. Please refer to other guides elsewhere to find out what hardware you’ll need.


Preliminary installation

@contraexemplo
contraexemplo / pulseaudio-noise-cancelling.md
Last active October 20, 2023 18:15
Como ativar o módulo de cancelamento de ruído do PulseAudio

Primeiro, verifique se o módulo está presente na sua instalação digitando pacmd em seu terminal, listando todos os módulos presentes pelo comando list-modules e procurando por module-echo-cancel. Não está presente? Você precisa adicionar algumas linhas ao arquivo de texto responsável pela configuração do PulseAudio.

Com o seu editor favorito, abra (com privilégios de administrador) o arquivo /etc/pulse/default.pa e adicione as seguintes linhas ao fim do arquivo:

### Enable Echo/Noise-Cancellation
load-module module-echo-cancel use_master_format=1 aec_method=webrtc aec_args="analog_gain_control=0\ digital_gain_control=1" source_name=echoCancel_source sink_name=echoCancel_sink
set-default-source echoCancel_source
set-default-sink echoCancel_sink
@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution.md
Last active September 5, 2025 14:09
Fix DNS resolution in WSL2

Permanent WSL DNS Fix (WSL 2.2.1+)

If you're encountering ping github.com failing inside WSL with a Temporary failure in name resolution, you're not alone — this has been a long-standing issue, especially when using VPNs or corporate networks.

This issue is now fixed robustly with DNS tunneling, which preserves dynamic DNS behavior and avoids limitations like WSL’s former hard cap of 3 DNS servers in /etc/resolv.conf.

DNS tunneling is enabled by default in WSL version 2.2.1 and later, meaning that if you're still seeing DNS resolution issues, the first and most effective fix is simply to upgrade WSL. Upgrading WSL updates the WSL platform itself, but does not affect your installed Linux distributions, apps, or files.

To upgrade WSL, follow these steps,

@manuelep
manuelep / default.py
Last active April 1, 2020 13:00
authenticate woocommerce webhook
def compute(body):
secret = '<here is my secret key>'
dig = hmac.new(secret.encode(),
msg = body.encode(),
digestmod = hashlib.sha256
).digest()
computed = base64.b64encode(dig).decode()
return computed
import os
import pytest
from alembic.command import upgrade
from alembic.config import Config
from project.factory import create_app
from project.database import db as _db