Skip to content

Instantly share code, notes, and snippets.

🇨🇱

Antonio Ossa aaossa

🇨🇱
Block or report user

Report or block aaossa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@aaossa
aaossa / README.md
Created Oct 1, 2017
Cómo trabajar con git branches
View README.md

Workflow con git

Para este proyecto seguiremos la metodología de tener una branch principal master (equivalente a release en otros proyectos), una branch dev (o development) para comprobar que todo funcione antes de enviar los cambios a master y múltiples "feature branches" para que cada colaborador pueda enacrgarse de una tarea definida, trabajarla y probarla a gusto antes de reunir los cambios en dev. Para más detalle y ejemplos pueden usar de esta lectura la sección Feature Branch Workflow.

From: https://www.atlassian.com/pt/git/workflows

Pasos para empezar a trabajar en una feature

@aaossa
aaossa / .gitmessage
Created Jan 26, 2017
My git commit template
View .gitmessage
# |<---- Using a Maximum Of 50 Characters ---->|
# If this commit is applied, it will...
# Examples of imperative mood: Refactor X, Update Y, Remove Z
Subject
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# What/why/how was this change made?
Body
# Any references to relevant tickets, articles, resources, etc?
@aaossa
aaossa / Bing.py
Created Jul 29, 2016
Run it and change your desktop wallpaper to "Bing's Image of the Day". Tested in Win7
View Bing.py
from requests import Session
from os.path import join
from os import getcwd, remove
from PIL import Image
import ctypes
URL = 'http://www.bing.com'
PATH = getcwd() + '\\images'
SPI_SETDESKWALLPAPER = 20
@aaossa
aaossa / asyncio_template.py
Last active Jul 10, 2016
Simple Python 3.5 asyncio base
View asyncio_template.py
import asyncio
async def slow_operation(n):
await asyncio.sleep(n)
print("{} Slow operation complete".format(n))
async def main():
await asyncio.wait([slow_operation(1),
slow_operation(2),
@aaossa
aaossa / secrets.py
Last active Jan 27, 2017
Python 3.6 secrets module source code. The secrets module is used for generating cryptographically strong random numbers suitable for managing data such as passwords, account authentication, security tokens, and related secrets.
View secrets.py
"""Generate cryptographically strong pseudo-random numbers suitable for
managing secrets such as account authentication, tokens, and similar.
See PEP 506 for more information.
https://www.python.org/dev/peps/pep-0506/
Code taken from source: https://hg.python.org/cpython/file/3.6/Lib/secrets.py
"""
__all__ = ['choice', 'randbelow', 'randbits', 'SystemRandom',
@aaossa
aaossa / AutoPull.bat
Created Mar 27, 2016
Batch utilities
View AutoPull.bat
@ECHO OFF
REM This bat file iterates on the folders in this directory and
REM makes a "git pull" over every folder (only "git repos")
FOR /f "delims=" %%D IN ('dir /a:d-h /b') DO (
CD %%~D
IF EXIST ".git" (
ECHO Repo: %%D
git pull
@aaossa
aaossa / .gitignore
Last active Jul 8, 2016
Template Tareas en LaTeX
View .gitignore
## Core latex/pdflatex auxiliary files:
*.aux
*.lof
*.log
*.lot
*.fls
*.out
*.toc
*.fmt
*.fot
View demo.tex
\documentclass[letter]{article}
\usepackage[utf8]{inputenc}
\begin{document}
Hola soy \textbf{Antonio Ossa :)} y mi función cuadrática favortita es $x^2 + 1$
\end{document}
@aaossa
aaossa / import_compiled.py
Last active Sep 8, 2015
This snippets allows to import a compiled python file in a simple way
View import_compiled.py
import imp
# This snippet allows to import a compiled python file
# in a simple way
my_module = imp.load_compiled(
"my_module", r"full\or\relative\path\to\module.pyc")
You can’t perform that action at this time.