Skip to content

Instantly share code, notes, and snippets.

View AndersonFirmino's full-sized avatar
🐍
📜 🎼 🎮 🐧 🦆

Anderson Araujo AndersonFirmino

🐍
📜 🎼 🎮 🐧 🦆
View GitHub Profile
@AndersonFirmino
AndersonFirmino / Strong Password RegEx
Created April 3, 2018 20:32 — forked from ravibharathii/Strong Password RegEx
A Regular Expression for a Strong Password
Description of this regular expression is as below:
Passwords will contain at least 1 upper case letter
Passwords will contain at least 1 lower case letter
Passwords will contain at least 1 number or special character
Passwords will contain at least 8 characters in length
Password maximum length should not be arbitrarily limited
(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$
@AndersonFirmino
AndersonFirmino / bench_client.py
Created March 20, 2018 01:16 — forked from iwanbk/bench_client.py
flask with ujson & json benchmark
#!/usr/bin/env python
import timeit
import jsonrpclib
import ujson
import requests
N_TEST = 10000
server_json = jsonrpclib.Server('http://localhost:8000/json/')
@AndersonFirmino
AndersonFirmino / flask_dump_request_response.py
Created March 15, 2018 12:38 — forked from TheWaWaR/flask_dump_request_response.py
Flask dump request and response example
#!/usr/bin/env python
# coding: utf-8
import os
import sys
import json
import uuid
import tempfile
from flask import Flask, request, Response, g
@AndersonFirmino
AndersonFirmino / gist:ad2220628b02fe17d561099710e628b3
Created March 15, 2018 12:14 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@AndersonFirmino
AndersonFirmino / git_branch_naming.md
Created March 15, 2018 12:14 — forked from revett/git_branch_naming.md
Git Branch Naming Conventions

<type>/<name>

<type>

bug    - Code changes linked to a known issue.
feat   - New feature.
hotfix - Quick fixes to the codebase.
junk   - Experiments (will never be merged).
@AndersonFirmino
AndersonFirmino / iterm2-solarized.md
Created March 11, 2018 21:03 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@AndersonFirmino
AndersonFirmino / SingletonMongoClient.py
Created February 22, 2018 03:35 — forked from wowkin2/SingletonMongoClient.py
Python Singleton with parameters (so the same parameters get you the same object) with support to default arguments and passing arguments as kwargs (but no support for pure kwargs).
"""
Python Singleton with parameters (so the same parameters get you the same object)
with support to default arguments and passing arguments as kwargs (but no support for pure kwargs).
And implementation for MongoClient class from pymongo package.
"""
from pymongo import MongoClient
import inspect
@AndersonFirmino
AndersonFirmino / trampoline.py
Created January 15, 2018 23:34 — forked from ejconlon/trampoline.py
Tail-Recursion helper in Python
#!/usr/bin/env python
"""
Tail-Recursion helper in Python.
Inspired by the trampoline function at
http://jasonmbaker.com/tail-recursion-in-python-using-pysistence
Tail-recursive functions return calls to tail-recursive functions
(themselves, most of the time). For example, this is tail-recursive:
@AndersonFirmino
AndersonFirmino / Godot IAP.gd
Created January 5, 2018 22:34 — forked from FEDE0D/Godot IAP.gd
In app purchases in Godot Engine: Examples
# Intent: interface to the GodotPayments module (remember to add the java path in the project settings android>modules )
"Intent.gd"
extends Node
# Interface for the GodotPayments module
# To use extend this script and save the result on the Global singleton 'Data'
const STATIC_RESPONSE_NONE = 0
const STATIC_RESPONSE_ALL = 1