Skip to content

Instantly share code, notes, and snippets.

View gabicavalcante's full-sized avatar
🏠
let's talk about python

Gabi Cavalcante gabicavalcante

🏠
let's talk about python
View GitHub Profile
@jph00
jph00 / py.md
Last active May 31, 2022 06:16
Organized and hyperlinked index to every module, function, and class in the Python standard library

All of the python 3.9 standard library

For a version without the collapsible details sections (so you can search the whole thing in your browser), click here.

Recomendações para mudar o nome da branch master para main

Em termos gerais acredito que o que tem que fazer são essas 4 coisas:

  • Criar a nova branch
  • Caso tenha um PR pra master, tem q mudar pra nova branch (que acho nem tenha agora pq pelo gitflow so vai pra la na hora de uma nova versão, seja de correção ou planejada)
  • Caso tenha uma pré-release tem que colocar pra essa nova branch (também acho que não terá no nosso caso)
  • Tem que alterar as configurações de proteções pra essa nova branch

Opção 1

@rochacbruno
rochacbruno / README.md
Last active May 12, 2024 12:02
Vim Configs and CheatSheet

VIM CheatSheet

Based on configuration provided in .config/nvim/init.vim

Glossary

  • L = Leader Key, mapped to a single space " "
  • C = Control
  • S = Shift
@eriknovak
eriknovak / logstash-pg-es.md
Last active February 10, 2024 17:53
Instructions for setting up the Logstash configuration for synching PostgreSQL with Elasticsearch

Populating Elasticsearch Index with Logstash

Logstash is a free and open server-side data processing pipeline that ingests data from a multitude of sources, transforms it, and then sends it to your favorite "stash."

This section describes how one can use it on UNIX to migrate data from a PostgreSQL database to elasticsearch.

The Prerequisites

@jwheat
jwheat / build-domain.py
Created September 26, 2019 15:19
Rasa domain Assembler
import os
import glob
import hiyapyco
path = 'data/domain'
yaml_list = []
for filename in glob.glob(os.path.join(path, '*.yml')):
with open(filename) as fp:
yaml_file = fp.read()
@hakib
hakib / custom_django_checks.py
Last active July 1, 2024 09:20
Custom django checks using Django check framework, inspect and ast.
"""
Custom django checks.
H001: Field has no verbose name.
H002: Verbose name should use gettext.
H003: Words in verbose name must be all upper case or all lower case.
H004: Help text should use gettext.
H005: Model must define class Meta.
H006: Model has no verbose name.
H007: Model has no verbose name plural.
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@fhferreira
fhferreira / BIN.txt
Last active January 24, 2022 19:16
Credit Card Validation
Elo:
/^((((636368)|(438935)|(504175)|(451416)|(636297))\d{0,10})|((5067)|(4576)|(4011))\d{0,12})$/
Hipercard:
/^(606282\d{10}(\d{3})?)|(3841\d{15})$/
-----------------------------------------
| Bandeira | Comeca com | Máximo de número | Máximo de número cvc |
| ---------- | ------------------------------------------- | ---------------- | -------------------- |
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@rdeavila
rdeavila / git-update-fork.sh
Last active June 28, 2024 13:53
Git: como atualizar um fork com as mudanças do original?
#!/bin/bash
# Adicione um novo remote; pode chamá-lo de "upstream":
git remote add upstream https://github.com/usuario/projeto.git
# Obtenha todos os branches deste novo remote,
# como o upstream/master por exemplo:
git fetch upstream