Skip to content

Instantly share code, notes, and snippets.

Facundo Bianco vando

View GitHub Profile
View Basic template for unix functions
case ${1} in
up|start) command ;;
down|stop) command ;;
restart) func_name down ; sleep 1 ; func_name up ;;
st|status) pgrep -fl command ;;
-h|--help|"") echo "useful info" ;;
*) echo -e "func_name: invalid option '$1'\nfunc_name -h for help" ;;
vando /
Last active Aug 29, 2015
Create virtual machines with qemu in Slackware


qemu-img create -f qcow2 debian.qcow 680M 
qemu-system-x86_64 -hda debian.qcow \
                   -cdrom /home/vando/down/debian-8.1.0-amd64-netinst.iso \
                   -boot d \
                   -m 512
View LVM

LVM Cheetsheet

gdisk (prepare HDD)

Run the command

gdisk /dev/sdb
vando /
Last active Oct 22, 2015
Solved Saltstack apache module enabled

I had this instrutions in Salt for install Apache modules


{% for modname in ['ssl','proxy_http'] %}  
{{ modname }}-mod:
    - name: {{ modname }}
vando /
Last active Apr 22, 2016
Docker aliases for shell
alias di='docker images'
alias dps='docker ps'
alias dgrep='di | grep'
alias drm='docker rm `docker ps -aq -f status=paused -f status=exited -f status=dead`' # Removes unused instances
alias drmi='docker rmi -f `docker images -q --filter "dangling=true"' # Removes images with name "<none>"
vando /
Last active Nov 30, 2015
How to install Slackware 14.1 on a machine with UEFI

First Step

Download and install Ubuntu following the default options. Once you login, format the HDD with an empty partition.

Slackware pre installation

Download Slackware64 14.1 and mount it

vando /
Last active Jan 17, 2016
Software poweroff or reset for Raspberry Pi through GPIO.
# Based on
# More info about the GPIO:
# sudo echo -e "\n@reboot root /home/pi/scripts/" >> /etc/crontab
if [[ $EUID -ne 0 ]]; then
echo "Error: This script must be run as root" >&2
exit 1
vando / 000-drone.conf
Created Feb 3, 2016
Apache 2.4 virtualhost for
View 000-drone.conf
<VirtualHost *:80>
Redirect 301 /
<VirtualHost *:443>
Include /etc/apache2/include/ssl
# Avoid multiple 303 response
View drone.go
[GIN] 2016/02/05 - 15:27:38 | 303 | 1.157281ms | XXX.XXX.XXX.XXX:62817 | GET /authorize
fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0x63 pc=0x7f31563ac4fc]
runtime stack:
runtime.throw(0xda6020, 0x2a)
/usr/local/go/src/runtime/panic.go:527 +0x90
/usr/local/go/src/runtime/sigpanic_unix.go:12 +0x5a
vando /
Last active Feb 15, 2016
Nagios pluging for Docker

Nagios plugin for Docker

This plugin monitors how much docker instances are stoped/exited/dead or if one instance is running.

Check not runnig instances

$> /usr/lib/nagios/plugins/ -w 3 -c 6
There are 2 not running container(s)
You can’t perform that action at this time.