Skip to content

Instantly share code, notes, and snippets.

View jniltinho's full-sized avatar
🏠
Working from home

Nilton Oliveira jniltinho

🏠
Working from home
View GitHub Profile
@jniltinho
jniltinho / error-modoboa.txt
Created October 26, 2013 13:05
Error Modoboa OpenSUSE 12.3 32Bits
Error Modoboa OpenSUSE 12.3 32Bits
Validating models...
0 errors found
October 26, 2013 - 07:48:11
Django version 1.5.5, using settings 'webmail.settings'
Development server is running at http://192.168.56.100:8000/
Quit the server with CONTROL-C.
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
package main
/*
Autor: Gustavo Freitas <gst.freitas@gmail.com>
URL: http://firebitsbr.wordpress.com/2014/03/22/golang-obter-ipv4-e-ipv6-localmente-com-cdir/
*/
import "fmt"
import "net"
@jniltinho
jniltinho / myip.go
Created March 26, 2014 16:55
Get My IP Golang
package main
/*
URL: https://github.com/mccoyst/myip/blob/master/myip.go
URL: http://changsijay.com/2013/07/28/golang-get-ip-address/
*/
import (
"net"
"os"
@jniltinho
jniltinho / get_external_ip.go
Created March 26, 2014 17:02
Get External IP Golang
package main
/*
URL: http://myexternalip.com/#golang
*/
import (
"io"
"net/http"
@jniltinho
jniltinho / getmyip.go
Created March 26, 2014 17:26
Get My IP External/Internal
package main
/*
Usage of ./getmyip --get_ip=(external|internal)
URL: http://myexternalip.com/#golang
URL: http://changsijay.com/2013/07/28/golang-get-ip-address/
*/
@jniltinho
jniltinho / backup_vms.py
Created January 21, 2015 01:37
Backup VMs XenServer/XCP
#!/usr/bin/python
# -*- coding: utf-8 -*-
## Versao 0.3
### Colocar no Crontab
## Script para Backup do Citrix
## 15 03 * * * /usr/local/bin/backup_vms.py --backup --sendmail --clean=3
import os, sys, optparse, socket
@jniltinho
jniltinho / xenserver_create_jessie_template_64bit.sh
Last active September 7, 2018 23:18
Script to install a Debian Jessie 8.0 template on Xenserver 6.5
#!/bin/bash
## Script to install a Debian Jessie 8.0 template on Xenserver 6.5
## https://gist.github.com/hingstarne/5320400
# Add your favourite mirror here
MIRROR=http://ftp.us.debian.org/debian/
# No need to edit something below
@jniltinho
jniltinho / Install_nagios3_ubuntu.sh
Last active July 1, 2019 11:57
Install Nagios3 Ubuntu
#!/bin/bash
## Script de Instalacao Nagios3 no Ubuntu 14.04 32Bits
## Autor: Nilton OS <jniltinho@gmail.com>
## Versao 0.2 12-07-2015
## Links:
## http://www.nagiosql.org/documentation.html
## Instalar Ambiente Apache2/PHP/Mysql
@jniltinho
jniltinho / install_tomcat.sh
Last active May 15, 2022 17:34
Install Tomcat 9 + JRE 8 on Linux
#!/bin/bash
### Install Tomcat 9 + JRE8 on Ubuntu, Debian, CentOS, OpenSUSE 64Bits
### URL com Screencast de Instalação do Tomcat9
### http://www.linuxpro.com.br/2017/04/instalando-tomcat-9-no-ubuntu/
### Link: https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-8-on-centos-7
## First install wget
## Primeiro instale o wget
@jniltinho
jniltinho / install_golang.sh
Last active February 3, 2024 15:42
Install Golang on Linux
#!/bin/bash
## Install Golang Stable 64Bits on Linux (Debian|Ubuntu|OpenSUSE|CentOS)
## http://www.linuxpro.com.br/2015/06/golang-aula-1-instalacao-da-linguagem-no-linux.html
## Run as root (sudo su)
## Thank's @geosoft1 | @gwmoura
GO_URL="https://go.dev/dl"
GO_VERSION=$(curl -s 'https://go.dev/VERSION?m=text'|head -n1)
GO_FILE="$GO_VERSION.linux-amd64.tar.gz"