Skip to content

Instantly share code, notes, and snippets.

View mazulo's full-sized avatar
🐍
Pythoning

Patrick Mazulo mazulo

🐍
Pythoning
View GitHub Profile
@aimestereo
aimestereo / zellij-sessionizer
Created August 5, 2023 19:37
zellij-sessionizer: ThePrimeagen/tmux-sessionizer but for zellij
#!/usr/bin/env bash
# set your own root folders, all children folders will become options for in sessionizer menu
root_folders="$HOME/projects $HOME/work $HOME/.config"
function attach_session() {
local session_root=$1
local session_name=$(basename "$session_root" | tr . _)
cd $session_root
zellij attach --create $session_name
@samuelcolvin
samuelcolvin / python-people.md
Last active June 23, 2024 19:06
An incomplete list of people in the Python community to follow on Twitter and Mastodon.

Python People

(Updated 2022-11-16 with suggestions from comments below, Twitter and Mastodon)

An incomplete list of people in the Python community to follow on Twitter and Mastodon.

With the risk that Twitter dies, I'd be sad to lose links to interesting people in the community, hence this list.

I would love you to comment below with links to people I've missed.

Roadmap de estudos de SQL

Aviso: Muitas vezes detalhes de várias operações podem variar de banco para banco. Em questões onde fiquei em dúvida, este documento segue o funcionamento do PostgreSQL, pois é o banco que conheço melhor.

Pré-requisito: Álgebra Relacional básica

Antes de começar a escrever SQL, você precisa entender o modelo de como um banco de dados relacional funciona. Não precisa se aprofundar muito, mas você precisa entender como que dados e relacionamentos entre eles são representados. (Nota importante: Relacionamento e relação não são a

@Finndersen
Finndersen / polymorphic_related_queryset.py
Last active August 29, 2023 12:53
PolymorphicRelatedQuerySet which allows select_related() to return polymorphic child models instead of base model

REVIEWING CODE:

  • If possible, before the review, talk to the requester for 5 minutes to get a bit of a preview of the code. This helps you get a mental understanding of what you are reviewing.

  • Teach, don't just tell. Reviewing a PR shouldn't JUST be about code safety, but also an opportunity to mentor as well.

  • Don't forget to praise concise/readable/efficient/elegant code.
  • Remember that you are reviewing another human's code. Ask, don't tell.
@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
@nevack
nevack / archived.md
Last active July 1, 2024 22:29
[ARCHIVED] Fix for CSR Dongle 0a12:0001 ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

This gist is currenctly archived.

Please refer to previous revisions if you know what to do.

The patch proposed was merged into kernel in 5.8 release, but no longer working as of linux 5.11

// Continuous iterator
function foo() {
// NOTE: don't ever do crazy long-running loops like this
for (let i = 0; i <= 1E10; i++) {
console.log(i);
}
}
// foo();
@birdofpray70
birdofpray70 / Working Effectively with Legacy Code.md
Last active April 9, 2021 16:37 — forked from jeremy-w/Working Effectively with Legacy Code.md
Notes on Michael Feathers' *Working Effectively with Legacy Code*.

Working Effectively with Legacy Code

Notes by Jeremy W. Sherman, October 2013, based on:

Feathers, Michael. Working Effectively with Legacy Code. Sixth printing, July 2007.

Foreword:

  • Software systems degrade into a mess.
  • Requirements ALWAYS change.
  • Your goal as a software developer: Create designs that tolerate change.