Skip to content

Instantly share code, notes, and snippets.

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

jules tiidadavena

:octocat:
Focusing
View GitHub Profile
@jsbueno
jsbueno / orable_streenums.py
Last active March 28, 2025 15:10
Python STrEnum whose members can be joined together with `|` resulting in a set.
from enum import StrEnum
class OrableStrEnum(StrEnum):
"""neat hack: Members can be combined with the `|` operator
That will result in a set - and then the `in` operator
is made to work with a single member as wll, so that
`if CAN_REVIEW in permissions:` will work whether permissions content is
permissions = CAN_REVIEW
@lleyton
lleyton / translation.md
Last active January 14, 2026 12:07
(ENG) Open Source Business Challenges and Reality, Rui Ueyama

Open Source Business Challenges and Reality

Original Japanese note here.

Original Author: Rui Ueyama (creator of the mold linker)

Translated by @windowsboy111

Minimally edited by @lleyton

@lucianoratamero
lucianoratamero / README.md
Last active December 20, 2022 13:21
How to iterate through string literals in TypeScript

How to iterate through string literals in TypeScript

// In edge cases, it would be useful to iterate through a string literal,
// so you can do something based on each value.

// Let's say you have a literal of UserRoles
@naanadr
naanadr / env_python.sh
Last active November 21, 2023 18:09
Python env shortcuts
# Python Env utils
# Add this follow lines in your .zshrc or .bashrc
export WORKON_HOME=~/envs
# eg: $ envcreate env_name
envcreate() {
NAME=$1
python -m venv $VENV_HOME/${NAME}
}

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

@biantris
biantris / javascript-base.md
Last active November 8, 2022 15:58
javascript-base

Um pouco dos conceitos que é esperado você dominar de js antes de ir para o react

  • Manipulação do DOM (manipulação de eventos, click, etc)
  • Estrutura de dados (arrays, objetos, vetores, estrutura de dados em json)
  • Map, Filter e Reduce
  • for in e o for of
  • Javascript ES6
  • Assincronismo (promisse, async/await, API fecth, requisições)
@cassidoo
cassidoo / base-css.md
Created May 4, 2022 06:37
Base CSS for a plain HTML document

If you don't want to deal with styling a mostly text-based HTML document, plop these lines in and it'll look good:

html {
  font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
  font-size: 1.3em;
  max-width: 40rem;
  padding: 2rem;
  margin: auto;
 line-height: 1.5rem;
@fdaciuk
fdaciuk / [PRÉ-WORK] Bootcamp React.js.md
Last active July 22, 2024 14:18
Referências da semana de pré-work do Bootcamp em React.js

[PRÉ-WORK] Bootcamp React.js

Referências da semana de pré-work do Bootcamp em React.js

Sobre o pré-work

A semana de pré-work acontecerá nos dias 16/08/2021 à 20/08/2021 na Twitch do Daciuk.

Nessa semana, as lives acontecerão excepcionalmente à partir das 15h. Todas as informações sobre o Bootcamp você encontra em: https://b-academy.brainn.co/

@lucianoratamero
lucianoratamero / README.md
Last active December 1, 2025 18:51
Using Vite with Django, the simple way

Using Vite with Django, the simple way

Warning

I'm surely not maintaining this as well as I could. There are also other possible, better integrated solutions, like django-vite, so keep in mind this was supposed to be more of a note to myself than anything :]

This gist has most of the things I've used to develop the frontend using vite inside a monolithic django app.

Here's a boilerplate that uses this approach: https://github.com/labcodes/django-react-boilerplate

A couple of things to note:

@andrebrait
andrebrait / keychron_linux.md
Last active February 13, 2026 10:19
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.