Skip to content

Instantly share code, notes, and snippets.

View raultm's full-sized avatar

Raul Tierno raultm

View GitHub Profile
@raultm
raultm / interfaces
Created October 31, 2018 12:34
Wol Interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
# Cambiar enp6s2 por la interfaz que queramos usar en nuestra maquina
auto enp6s2
iface enp6s2 inet dhcp
post-up /sbin/ethtool -s $IFACE wol g
post-down /sbin/ethtool -s $IFACE wol g
@raultm
raultm / interfaces
Created October 31, 2018 12:31
Activar Wake On Lan en un ordenador con XUbuntu 18
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
# Cambiar enp6s2 por la interfaz que queramos usar en nuestra maquina
auto enp6s2
iface enp6s2 inet dhcp
post-up /sbin/ethtool -s $IFACE wol g
post-down /sbin/ethtool -s $IFACE wol g
@raultm
raultm / 00.Steps.md
Last active May 11, 2018 10:43
Steps/Files to add Google Auth to App-Framework
@raultm
raultm / setup_nginx_php7.sh
Created January 30, 2018 09:47
setup_nginx_php7.sh
# Setup Nginx & PHP7
## (https://www.digitalocean.com/community/tutorials/como-instalar-linux-nginx-mysql-php-lemp-stack-in-ubuntu-16-04-es)
# Actualizamos los repos de apt
sudo apt-get update
# Instalamos Nginx
sudo apt-get install nginx
# Si usas ufw firewall dar acceso
@raultm
raultm / noipsetup.sh
Last active January 30, 2018 09:52
noipsetup
# Install NoIp
## Descargamos el cliente
wget http://www.noip.com/client/linux/noip-duc-linux.tar.gz
## Descomprimimos
tar xzf noip-duc-linux.tar.gz
## Nos metemos en la carpeta
cd noip-2.1.9-1
@raultm
raultm / ngingx_default.conf
Last active January 30, 2018 09:42
Setup Home Server
# /etc/nginx/sites-available/default
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name _;
@raultm
raultm / main
Last active June 18, 2017 06:29
Check Styles persist in remote command
#!/bin/bash
# Permlaink to GIST raw https://gist.github.com/atenni/5604615
# bash <(curl -s https://gist.githubusercontent.com/raultm/7a26e876445fa76c79f3e3b5f1d9d7ab/raw/main)
# SOURCE Bashstyling (https://gist.github.com/raultm/c68dca2d076273f569b51653503ead05)
source <(curl -s https://gist.githubusercontent.com/raultm/c68dca2d076273f569b51653503ead05/raw)
title "Vamos a ejecutar un comando descargado con curl..."
bash <(curl -s https://gist.githubusercontent.com/raultm/7a26e876445fa76c79f3e3b5f1d9d7ab/raw/remote)
@raultm
raultm / checkssh
Created June 16, 2017 11:46
check SSH
until ssh root@$1
do
echo "Try again"
sleep 10
done
@raultm
raultm / activa-nat
Created June 16, 2017 07:34
activa-nat
#! /bin/sh
### BEGIN INIT INFO
# Provides: activa-nat
# Required-Start: $remote_fs
# Should-Start: $network $syslog
# Required-Stop: $remote_fs
# Should-Stop: $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Enabling NAT for clients behind eth1
@raultm
raultm / bashstyling
Created June 16, 2017 07:17
Bash Styling
#!/bin/bash
RESTORE=$(echo -en '\033[0m')
# \033[STYLE;COLORm OR \033[STYLE;BGCOLOR;COLORm
# STYLES 01:BOLD; 02:LIGHT; 03:???; 04:UNDERLINE; 05:???; 06:INVERSE
RED=$(echo -en '\033[00;31m')
GREEN=$(echo -en '\033[00;32m')
YELLOW=$(echo -en '\033[00;33m')
BLUE=$(echo -en '\033[00;34m')
MAGENTA=$(echo -en '\033[00;35m')
PURPLE=$(echo -en '\033[00;35m')