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 / 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 / dirf2017-javaloader-install.bat
Last active January 17, 2018 06:06
Cria um loader .BAT e um atalho no Desktop para o Dirf2017
@echo off
:: Gustavo Arnosti Neves - Fev 2017
:: https://github.com/tavinus
:: https://gist.github.com/tavinus/812db2dbf9c22908ebc3c0a37f87e818
:: Se voce instalou o Dirf2017 em uma pasta diferente, mude aqui!
set DIRFFOLDER=C:\Arquivos de Programas RFB\Dirf2017
@ECHO OFF
:: Dirf2017 Java Loader - https://gist.github.com/tavinus/3f2a485434b755d6569976215d3f4ea0
:: Use o instalador em: https://gist.github.com/tavinus/812db2dbf9c22908ebc3c0a37f87e818
set PATH=C:\Arquivos de Programas RFB\Dirf2017\clientfirebird;%PATH%
start /d "C:\Arquivos de Programas RFB\Dirf2017" "" "javaw" -jar pgdDirf.jar -classpath "C:\Arquivos de Programas RFB\Dirf2017\lib"
@tavinus
tavinus / x11vnc-start
Last active March 29, 2018 20:14
Starts VNC server for the current session
#!/bin/bash
###########################################################################
# /usr/local/bin/x11vnc-start
# Starts VNC server for the current session
#
# Gustavo Neves - 4th Jul 2016
#
# Install x11vnc:
# sudo apt-get install x11vnc
@tavinus
tavinus / ppk2pem.sh
Last active April 1, 2018 00:29
Transforms putty certificates to OpenSSH (ppk to pem)
#!/bin/bash
########################################################################
## ppk2pem.sh
##
## Gustavo Arnosti Neves
## 30 / Ago / 2016
##
## Transforma um certifica .ppk (Putty) para .pem (OpenSSH)
## usando o aplicativo puttygen (deve ser instalado na maquina)
@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 / md-lists.md
Last active September 16, 2018 08:24
Markdown Lists Tests and Examples

Markdown Lists Tests and Examples

This document makes some tests with .md lists to see how they render here on github.
Some test renders are shown at the first comment below to compare gist/comment parsers.

Highlights (Aug, 2018)

  • Lists seem to break on specific spacings for both types
  • Lists seem to break differently on github comments and gists (still didn't test a full repo)
  • Both lists seem to break when you use -1 spaces than what it needs to change levels
  • It could be that the sequential spacing on tests helps to break the parser (being tested)
  • There is a range of spacings that can be used, as long as kept consistent