Skip to content

Instantly share code, notes, and snippets.

View tavinus's full-sized avatar

Gustavo Arnosti Neves tavinus

View GitHub Profile
@tavinus
tavinus / dyn-iptables.sh
Created December 24, 2017 01:40
Open ports for dynamic host names
#! /bin/bash
##################################################################################################
#
# https://ubuntuforums.org/showthread.php?t=1655443
# http://www.jrepo.org/wp/dyndns-iptables-auto-update-script/
# leave a comment for fixes
# uses: iptables, cron, perl, dig, netfilter multiport support in kernel. see command vars below.
#
#################################### variables #########################################
@tavinus
tavinus / redirecionando.html
Created December 27, 2017 03:48
redirecionando.html
<html>
<head>
<style>
@import url(//fonts.googleapis.com/css?family=Open+Sans:300);
body {
background-color: #f1c40f;
overflow: hidden;
@tavinus
tavinus / mm2points.c
Created December 31, 2017 03:13
Millimeters to Points
int mm_to_points(double mm) {
// 1 point = 1/72 inches
// 1 inch = 25.4 mm
// 1 mm = 1 / 25.4 inches
// 1 inch = 72 points
// x mm = x / 25.4 * 72 points
return round(mm / 25.4 * 72);
}
@tavinus
tavinus / flushredis-socket-alias.sh
Last active January 3, 2018 05:44
Redis on socket FLUSHALL alias
#!/bin/bash
# Just source this
# . ./flush-redis-socket-alias.sh
# or copy paste
# or add to .profile
# or not
alias flushredis='sudo redis-cli -s /var/run/redis/redis.sock flushall'
@tavinus
tavinus / compile-puttygen.md
Last active January 1, 2024 19:40
Compile puttygen for linux server (withouth putty)

Getting puttygen (without putty)

We needed puttygen running on an Amazon Linux (Fedora) install that has a broken putty package on yum. It fails to install because of missing X dependencies. Honestly, I was a bit glad that it failed or it would have installed a bunch of undesired X dependencies.

Debian based distros have the advantage of having a separate package for the cli tools called putty-tools.
So if you are on Debain/Ubuntu/Mint/etc you can just

sudo apt-get install putty-tools
@tavinus
tavinus / debootstrap-autosystem.md
Last active December 17, 2019 11:18
Rodar Autosystem em AMD64 e ARM

Para rodar o Autosystem em sistemas não suportados.
Exemplos: Linux 64 bits, Raspberry Pi.

debootstrap em AMD64

Testado em

  • Linux Mint 18.3 x86_64

1 - Máquina Hospedeira 64 bits

Pegar pacotes

sudo apt update
@tavinus
tavinus / make_as_links.sh
Last active April 7, 2018 05:01
Gera Links e Lançadores para AutoSystem em chroot (jessie_i386)
@tavinus
tavinus / as_fix_permissions.sh
Last active April 11, 2018 20:49
Reseta permissões de um Autosystem Instalado (linux)
#!/usr/bin/env bash
#########################################
# as_fix_permissions.sh
#
# Tenta resolver problemas com permissões
# Deve ser rodado depois do as_update
#
# wget -O as_fix_permissions.sh 'https://gist.githubusercontent.com/tavinus/5a57c54d7303ec0a8cff9dcfc4b1bad4/raw' && chmod +x as_fix_permissions.sh
#
@tavinus
tavinus / rfb-wine.md
Last active November 3, 2025 16:00
Programas RFB (Receita Federal do Brasil) no Wine

Programas RFB no Wine

Este guia tem como objetivo guardar informações de como rodar os programas da receita federal no Wine.
Visa oferecer uma forma de rodar os programas proprietários do Windows no Linux.

Não use este guia para os programas da RFB baseado em Java!
Os programas da RFB baseados em Java devem rodar na VM Java do Linux nativamente.
Rodar Java no Wine não é recomendado!

Testado com Wine 3.0 no Linux Mint 18.3 64bit

Abreviações

@tavinus
tavinus / rem_proxmox_popup.sh
Last active December 22, 2024 00:21
Remove PROXMOX 5.x / 6.x / 7.3-4 subscription message popup
#!/bin/sh
#######################################################
#
# Edits the proxmox Subscription file to make it
# think that it has a Subscription.
#
# Will disable the annoying login message about
# missing subscription.
#