View db_backup_restore.sh
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 | |
# FEATURES: Progress bar with ETA, support multiple databases (dump into separated files) and password as argument | |
# REQUIREMENTS: | |
# ============= | |
# GNU Core Utilities, mysql, mysqldump, pv (https://github.com/icetee/pv) | |
set -e |
View gist:d3df4f1f4a3024ebae3adda48e622e2e
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
1. Tras un do-release-upgrade salen errores de codificación ASCII <-> UTF-8, se puede solventar así: | |
LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 do-release-upgrade | |
2. Si no salen versiones compatibles para actualizar, se puede forzar editando el fichero /var/lib/update-manager/meta-release | |
Eliminando las releases que no son compatibles y poniendo a 1 el campo Supported de la versión a la que queramos actualizar | |
Dist: eoan | |
Name: Eoan Ermine |
View proxmox-install-post.sh
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 | |
################################################################################ | |
# This is property of eXtremeSHOK.com | |
# You are free to use, modify and distribute, however you may not remove this notice. | |
# Copyright (c) Adrian Jon Kriel :: admin@extremeshok.com | |
################################################################################ | |
# | |
# Script updates can be found at: https://github.com/extremeshok/xshok-proxmox | |
# | |
# post-installation script for Proxmox |
View MySQL 8 y optimización
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 | |
sudo apt-get install gnupg -y | |
cd /tmp | |
wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.13-1_all.deb | |
sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb | |
sudo apt-get update | |
sudo apt-get install mysql-server | |
echo [mysqld] >> /etc/mysql/my.cnf | |
echo innodb_dedicated_server = ON >> /etc/mysql/my.cnf |
View Script inicial nuevo server
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 | |
locale-gen es_ES.UTF-8 | |
dpkg-reconfigure locales | |
apt-get update | |
apt-get upgrade -y | |
apt get install gnupg htop vim unzip unattended-upgrades -y | |
-y | |
timedatectl set-timezone Europe/Madrid |
View .bash_profile
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
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
View compila_ionic.sh
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 | |
clear | |
echo | |
echo " .d8888b. .d88888b. 888b d8888888888b.8888888888 d8888 " | |
echo " d88P Y88bd88P. .Y88b8888b d8888888 Y88b 888 888 d88888 " | |
echo " 888 888888 88888888b.d88888888 888 888 888 d88P888 " | |
echo " 888 888 888888Y88888P888888 d88P 888 888 d88P 888 " | |
echo " 888 888 888888 Y888P 8888888888P. 888 888 d88P 888 " |
View renombraFotosExif.sh
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
# Auto rota las imagenes y renombra en función de la fecha de disparo. | |
# Es necesario jhead http://www.sentex.net/~mwandel/jhead/ | |
# y sudo npm install --global jpegtran-bin | |
find "$1" -name "*.jpg" -exec jhead -exonly -autorot -nf%Y-%m-%d_%H-%M-%S {} \; | |
find "$1" -name "*.JPG" -exec jhead -exonly -autorot -nf%Y-%m-%d_%H-%M-%S {} \; |
View gitpull.sh
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
# It's part from my bash_profile | |
function gitpull { | |
REPOS=( /route/repo /route/repo2 /route/repo3 ) | |
for R in "${REPOS[@]}"; do | |
echo "Actualizando repo $R." | |
pushd "$R" >/dev/null && { | |
git pull | |
popd >/dev/null |
View gitstatus.sh
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
# It's part from my bash_profile | |
function gitstatus { | |
REPOS=( /route/repo /route/repo2 /route/repo3) | |
for R in "${REPOS[@]}"; do | |
echo "Comprobando repo $R." | |
pushd "$R" >/dev/null && { | |
git status | |
popd >/dev/null |
NewerOlder