Skip to content

Instantly share code, notes, and snippets.

View ma0c's full-sized avatar

Mauricio Collazos ma0c

View GitHub Profile
h1 {
animation: type 3s steps(14);
overflow: hidden;
white-space: nowrap;
font-family: consolas;
border-right: 4px solid black;
width: 14ch;
ma0c /
Last active November 27, 2018 19:03
Update filter for file prefix
import os
import argparse
import logging
logger = logging.getLogger()
def parse_data():
Create a argument parser to configure script in a vervose way
ma0c / spaceinvaders.html
Created April 20, 2018 04:26
<script src="spaceinvaders.js"> </script>
<canvas id="spaceinvaders" top="100" left="100" width="600" height="600"> </canvas>
window.onload = () => {
const game = new SpaceInvadersGame(document.getElementById("spaceinvaders").getContext('2d'));
window.onkeydown = game.keypress.bind(game);
ma0c /
Created April 19, 2018 14:54
Tic Tac Toe Minimal Python
import requests
import time
WELCOME_MESSAGE = "Welcome to tictactoe press: \n1. To play\n2. For Instructions\n3. Exit:\n"
UNAVAILABLE_OPTION = "Unavailable option"
GETTING_GAME_MESSAGE = "We're checking for game availability"
ma0c / AWS Swarm
Created May 3, 2017 16:46 — forked from ghoranyi/AWS Swarm
Create a Docker 1.12 Swarm cluster on AWS

This gist will drive you through creating a Docker 1.12 Swarm cluster (with Swarm mode) on AWS infrastructure.


You need a few things already prepared in order to get started. You need at least Docker 1.12 set up. I was using the stable version of Docker for mac for preparing this guide.

$ docker --version
Docker version 1.12.0, build 8eab29e

You also need Docker machine installed.

ma0c / start_docker_registry.bash
Created March 25, 2017 04:36 — forked from PieterScheffers/start_docker_registry.bash
Start docker registry with letsencrypt certificates (Linux Ubuntu)
#!/usr/bin/env bash
# install docker
# install docker-compose
# install letsencrypt
ma0c / tmux-cheatsheet.markdown
Created February 23, 2017 22:46 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
ma0c /
Last active March 6, 2018 09:46 — forked from Kartones/
PostgreSQL command line cheatsheet


Palabras mágicas:

psql -U postgres

Si ejecutas con la bandera -E, describirá las consultas subyacentes que se realizan con los comandos \ (genial para aprender).

La mayora de comandos \d soportan un parámetro adicional del __schema__.name__ y aceptan comodines como *.*