Skip to content

Instantly share code, notes, and snippets.

@malambra
malambra / reload_conn_azure.sh
Last active October 7, 2022 15:19
Script para regenerar kubeconfig con todas los aks de nuestros resource_groups
#!/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
@malambra
malambra / tuningdb.sh
Last active November 11, 2015 21:20
Tuning DB. Configuración inicial para MySql o Postgres.
#!/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
#==============================================================================
@malambra
malambra / control_gpio.sh
Created May 10, 2014 18:25
Shell script to control GPIO ports - perform operations controlled by a switch.
#! /bin/bash
################
## Celtha. 2013
################
if [[ $EUID -ne 0 ]]; then
echo "Error: Debo ejecutarme como root" >&2
exit 1
fi
#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
*/
@malambra
malambra / usuarios.py
Created September 23, 2011 12:41
Script para creacion de usuarios Linux - Python
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Copyright: Manolo
Licencia: Affero GPL V3
Requisitos: Python 2.4
Script para crear usuarios Unix.
Uso:
----
@malambra
malambra / monitoriza.py
Created September 13, 2011 17:33
Script de monitorizacion de sistemas Linux en Python
#!/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.