tmux shortcuts & cheatsheet
start new:
tmux
start new with session name:
tmux new -s myname
start new:
tmux
start new with session name:
tmux new -s myname
#!/usr/bin/env bash | |
# install docker | |
# https://docs.docker.com/engine/installation/linux/ubuntulinux/ | |
# install docker-compose | |
# https://docs.docker.com/compose/install/ | |
# install letsencrypt | |
# https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04 |
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.
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 *.*
import requests | |
import time | |
BOARD_WIDTH = 3 | |
BOARD_HEIGHT = 3 | |
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" |
<html> | |
<head> | |
<script src="spaceinvaders.js"> </script> | |
</head> | |
<body> | |
<canvas id="spaceinvaders" top="100" left="100" width="600" height="600"> </canvas> | |
<script> | |
window.onload = () => { | |
const game = new SpaceInvadersGame(document.getElementById("spaceinvaders").getContext('2d')); | |
window.onkeydown = game.keypress.bind(game); |
import os | |
import argparse | |
import logging | |
logger = logging.getLogger() | |
logger.addHandler(logging.StreamHandler()) | |
def parse_data(): | |
""" | |
Create a argument parser to configure script in a vervose way |
<html> | |
<head> | |
<style> | |
h1 { | |
animation: type 3s steps(14); | |
overflow: hidden; | |
white-space: nowrap; | |
font-family: consolas; | |
border-right: 4px solid black; | |
width: 14ch; |