Skip to content

Instantly share code, notes, and snippets.

View diegargon's full-sized avatar

DieGarGon diegargon

View GitHub Profile
@diegargon
diegargon / QoS
Last active May 20, 2023 21:20
QoS Ubuntu Script
#!/bin/bash
# Diego García Gonzalez (diegargon) diego@envigo.net
# v1.0
### BEGIN INIT INFO
# Provides: myQoS
# Required-Start: networking, myFirewall
# Required-Stop:
# Should-Start:
# Should-Stop:
# Default-Start: 2 3 4 5
@diegargon
diegargon / firewall
Last active October 12, 2020 18:30
Ubuntu Firewall init script, NAT and services
#!/bin/bash
# Diego García Gonzalez (diegargon) diego@envigo.net
VER=v3.4
### BEGIN UBUNTU INIT
# Provides: myFirewall
# Required-Start: networking
# Required-Stop:
# Should-Start:
# Should-Stop:
# Default-Start: 2 3 4 5
#!/bin/bash
#
# diegargon http/mail: diego.envigo.net
# Simple bash script for backup a sql database
# This script need Dropbox_Uploader https://github.com/andreafabrizi/Dropbox-Uploader
#
# Warning: zip/password its a bad option if you want protect sensitive data
#BEGIN CONFIG
TMP_DIR="/tmp/"
@diegargon
diegargon / dropbox_mysql_backup.php
Last active April 25, 2016 14:22
Simple php script for backup a database and upload to dropbox
<?php
/**
* diegargon http/mail: diego.envigo.net
* Simple php script for backup a database and upload to dropbox
* This script need Dropbox_Uploader https://github.com/andreafabrizi/Dropbox-Uploader
* Warning: zip/password its a bad option if you want protect sensitive data
*/
// Config Start
$tmp_dir = "/tmp/";
@diegargon
diegargon / ping-scan.sh
Last active April 7, 2016 22:49
Ping Scan multiple hosts 255.255.0.0 and output alive systems (threads)
#!/bin/bash
# diegargon http/mail:diego.envigo.net
#
# Ping Scan multiple hosts 255.255.0.0 and output alive systems
# Usage: ./ping-scan.bash 192.168
#
#Start config
ping_path="/usr/bin/fping"
ping_opt=" -t 200 "