Skip to content

Instantly share code, notes, and snippets.

View Tlaloc-Es's full-sized avatar

Joseba Fuentes Tlaloc-Es

View GitHub Profile
@Tlaloc-Es
Tlaloc-Es / Git Doc.md
Last active August 22, 2023 07:39
Git basic workflow

Git workflow

image

The workflow outlined below is a basic one that would be used when we want to do product development without maintaining older versions.

For example, there may be projects where a version 1.0.0 of the product is generated, and then a version 2.0.0 of the product is developed. In such cases, you may want to support version 1.0.0 while continuing to develop version 2.0.0 by adding commits for fixes to both versions but only new features to the latest version.

This workflow is primarily not intended for such cases but rather for situations where the latest published version is the only one maintained, as in the case of a service or a library.

build = "python setup.py bdist_wheel"
test = "python pytest -s -v test/"
mypy = "mypy --strict --implicit-reexport dlr"
lint = "pylint ."
isort = "isort . --profile black"
format = "black dlr ."
pre_commit_update = "pre-commit autouptade"
pre_commit_all = "pre-commit run --all-files"
clean = [
{clean_pycache = "find . | grep -E '(/__pycache__$|\.pyc$|\.pyo$)' | xargs rm -rf"},
# https://blog.icodes.tech/posts/python-firebase-authentication.html
import click
import requests
apikey = 'apikey'
DEFAULT_EMAIL = 'user@user.user'
DEFAULT_PASSWORD = 'password'
@Tlaloc-Es
Tlaloc-Es / Shortcuts.md
Last active March 29, 2023 09:44
Utils bash scripts as python developer

GIT

Change branch witouth commit

git stash save -u "message"
git stash list
git checkout other-branch

Semantic Commit Messages with Emojis

Commit format: <emoji_type> <commit_type>(<scope>): <subject>. <issue_reference>

Example

:sparkles: feat(Component): Add a new feature. Closes: #
^--------^ ^--^ ^-------^   ^---------------^  ^------^
|          |    |           |                  |
| | | | +--&gt; (Optional) Issue reference: if the commit closes or fixes an issue
@Tlaloc-Es
Tlaloc-Es / git-branching-diagram.md
Created August 26, 2022 07:41 — forked from bryanbraun/git-branching-diagram.md
Example Git Branching Diagram

Example Git Branching Diagram

You can use this diagram as a template to create your own git branching diagrams. Here's how:

  1. Create a new diagram with diagrams.net (formerly draw.io)
  2. Go to File > Open From > URL
  3. Insert this url (it points to the xml data below): https://gist.githubusercontent.com/bryanbraun/8c93e154a93a08794291df1fcdce6918/raw/bf563eb36c3623bb9e7e1faae349c5da802f9fed/template-data.xml
  4. Customize as needed for your team.

@Tlaloc-Es
Tlaloc-Es / gist:f89afac5d9db0fbb98e81b983f68d21d
Created October 11, 2021 07:21 — forked from gaurav/gist:41182
A quick command to list all the files modified by an author in a repository
git log --name-status --pretty=format:'' --author=authorname | sort | uniq
@Tlaloc-Es
Tlaloc-Es / mexico.geojson
Created March 23, 2020 14:02
Estados de Mexico geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Tlaloc-Es
Tlaloc-Es / heapvsarray.java
Created September 20, 2019 13:39
Comparacion
package hackerrang;
import java.io.FileWriter;
import java.util.Arrays;
import java.util.PriorityQueue;
import java.util.Random;
public class Lista {
public static void main(String[] args) {
function mergesort(list){
if(list.length > 1){
let middle = list.length/2
return merge(mergesort(list.slice(0, middle)), mergesort(list.slice(middle, list.length)))
}else{
return list
}
}
function merge(listA, listB){