This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tablero = [["-"]*7 for i in range(6)] | |
def print_tablero(tablero): | |
print(" " + " ".join(str(i) for i in range(7))) | |
for idx, fila in enumerate(tablero): | |
print(idx, " ".join(fila)) | |
def jugada(jugador, columna): | |
lleno = True | |
for fila in range(5, -1, -1): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -o errexit # abort on nonzero exitstatus | |
set -o nounset # abort on undeclared variable | |
set -o pipefail # don't hide errors within pipes | |
# set -o xtrace # track what is running - debugging | |
# Set magic variables for current file & dir | |
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # <-- get path of the script | |
__file="${__dir}/$(basename "${BASH_SOURCE[0]}")" # <-- get full path name of the script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash - | |
#title :tuningdb.sh | |
#description :This script makes an initial calculation of the recommended values for the tuning of DB. | |
#author :celtha | |
#date :20150919 | |
#version :0.5 | |
#usage :bash tuningdb.sh | |
#notes :N.A | |
#============================================================================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
################ | |
## Celtha. 2013 | |
################ | |
if [[ $EUID -ne 0 ]]; then | |
echo "Error: Debo ejecutarme como root" >&2 | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <WString.h> | |
#include <Ethernet.h> | |
/* | |
Prueba de concepto: | |
Servidor web para control de interfaces de arduino via "get" | |
Copyright: Manolo | |
Licencia: Affero GPL V3 | |
2012 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
""" | |
Copyright: Manolo | |
Licencia: Affero GPL V3 | |
Requisitos: Python 2.4 | |
Script para crear usuarios Unix. | |
Uso: | |
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
""" | |
Copyright: Manolo | |
Web: http://celtha.blogspot.com/ | |
Licencia: Affero GPL V3 | |
Requisitos: Python 2.4 Si se quiere usar el modulo Subprocess en lugar de os | |
Si se ejecuta en python 3.x se debe cambiar la llamada "raw_input" por "input" | |
Script para monitorizar sistemas. |