Skip to content

Instantly share code, notes, and snippets.

View tonybolzan's full-sized avatar

Tonin Bolzan tonybolzan

View GitHub Profile
@tonybolzan
tonybolzan / newrelic_install.sh
Last active November 29, 2019 15:02
NewRelic Installer for x64 glibc linux system without PHP ZTS
#!/bin/bash
set -euo pipefail
# NewRelic Installer for x64 glibc linux system without PHP ZTS
# Tested on debian:buster-slim
INSTALL_DIR=$(mktemp -d -t)
PHP_VER=$(php -r 'echo PHP_MAJOR_VERSION . "." . PHP_MINOR_VERSION;')
PHP_DIR=$(php -r 'echo ini_get("extension_dir");')
PHP_API=${PHP_DIR##*/}
@tonybolzan
tonybolzan / ubuntu-login-1FA-yubikey.sh
Created February 26, 2019 16:45
Iniciar o Ubuntu usando somente a Yubikey
# Processo para liberar o login no Ubuntu 18.04 usando somente o Yubikey (1FA)
# Este processo não é o mais seguro, mas é um bom equilibrio entre praticidade e segurança.
# Insira o yubikey
# Abra um terminal com o usuário que deseja liberar o acesso
# Instale as dependências
sudo apt-get install libpam-u2f
# Crie o arquivo de autenticação
mkdir -p ~/.config/Yubico
@tonybolzan
tonybolzan / gpg-yubikey.sh
Last active February 12, 2024 18:21
Ubuntu 20.04 + GPG | Git, SSH, Yubikey 5
#!/bin/bash
#
# Ubuntu 20.04 + GPG | Git, SSH, Yubikey 5
#
# https://github.com/dainnilsson/scripts/blob/master/base-install/git.sh
# https://github.com/dainnilsson/scripts/blob/master/base-install/gpg.sh
# https://riseup.net/en/security/message-security/openpgp/best-practices
# https://www.forgesi.net/gpg-smartcard/
############################################################

Keybase proof

I hereby claim:

  • I am tonybolzan on github.
  • I am bolzan (https://keybase.io/bolzan) on keybase.
  • I have a public key ASC3njfZF9CETnYJCZaQK5mhXmIUyEQIt7d5GexkoCpggAo

To claim this, I am signing this object:

@tonybolzan
tonybolzan / ssl-localhost.sh
Last active April 29, 2016 21:06
Self Signed SSL to localhost
#!/bin/bash
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out /etc/nginx/ssl/nginx.crt -subj "/CN=localhost"
@tonybolzan
tonybolzan / index.html
Last active August 29, 2015 14:10
TFGII - Resultados
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<script>
$(function() {
$('#container').highcharts({
chart: {
type: 'spline'
@tonybolzan
tonybolzan / mysqldumpall.sh
Created March 26, 2014 21:01
Backup (mysqldump) all your MySQL databases in separate files
#!/bin/bash
# MySQL Dump All
#
# Backup (mysqldump) all your MySQL databases in separate files
#
# Author Tonin R. Bolzan <tonin@bolzan.io>
# License http://www.opensource.org/licenses/mit-license.php MIT License
# https://gist.github.com/tonybolzan
@tonybolzan
tonybolzan / google_drive_upload.sh
Created March 26, 2014 20:36
This script enable to send files to a specific folder in your Google Drive Account
#!/bin/bash
# Google Drive Uploader
#
# This script enable to send files to a specific folder in your Google Drive Account
# You can easily back up your data on Google Drive
#
# Author Tonin R. Bolzan <tonin@bolzan.io>
# License http://www.opensource.org/licenses/mit-license.php MIT License
# https://gist.github.com/tonybolzan
@tonybolzan
tonybolzan / MediaServer.sh
Last active December 28, 2015 22:59
Script para instalar um Media Server completo, Incluindo: plex, owncloud, transmission, bittorrent sync
#!/bin/bash
# Media Server
# Script para instalar um Media Server completo, Incluindo: plex, owncloud, transmission, bittorrent sync
#
# http://doc.owncloud.org/server/5.0/admin_manual/installation/installation_others.html#nginx-configuration
# http://btsync.s3-website-us-east-1.amazonaws.com/BitTorrentSyncUserGuide.pdf
#
# ownCloud http://localhost
# Plex http://localhost/plex
@tonybolzan
tonybolzan / php_benchmark.php
Created October 23, 2012 04:14
Teste de tempo de hash de senhas em php
<?php
$n_pass = 200000;
$n_iter = 2;
function generate() {
return uniqid(rand(), TRUE);
}
$total_time_ini = microtime(true);