Skip to content

Instantly share code, notes, and snippets.

View tavinus's full-sized avatar

Gustavo Arnosti Neves tavinus

View GitHub Profile
@hofmannsven
hofmannsven / README.md
Last active May 3, 2024 15:30
Git CLI Cheatsheet
@cdown
cdown / gist:1163649
Last active April 9, 2024 01:10
Bash urlencode and urldecode
urlencode() {
# urlencode <string>
old_lc_collate=$LC_COLLATE
LC_COLLATE=C
local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:$i:1}"
case $c in
@maxwelleite
maxwelleite / ttf-vista-fonts-installer.sh
Last active April 4, 2024 20:14
Script to install Microsoft Vista TrueType Fonts (TTF) aka Microsoft’s ClearType fonts on Ubuntu distros
#!/bin/bash
# Author: Maxwel Leite
# Website: http://needforbits.wordpress.com/
# Description: Script to install Microsoft Vista TrueType Fonts (TTF) aka Microsoft’s ClearType fonts on Ubuntu distros
# Microsoft added a group of new "ClearType Fonts" to Windows with Windows Vista and Office 2007.
# These fonts are named Constantia, Corbel, Calibri, Cambria (and Cambria Math), Candara, and Consolas.
# Calibri became the default font on Microsoft Word 2007, and it’s still the default font on Word 2016 today.
# Dependencies: wget, fontforge and cabextract
# Note: Microsoft no longer provides the PowerPoint Viewer 2007 (v12.0.4518.1014) or any version anymore for download
# Tested: Ubuntu Saucy/Trusty/Xenial/Bionic
@tavinus
tavinus / acme-proxmox-dynu.md
Last active March 29, 2024 17:15
Using acme.sh on the proxmox host (with Dynu DNS)

Proxmox + acme.sh

Using acme.sh on the proxmox host to generate Letsencrypt certificates

With this we show how to use acme.sh instead of the original Letsencrypt interface.

Acme.sh is just a Bash script that can run on pretty much any *nix environment.
It is quite simple but also quite powerfull.

In this guide I will use the cheap and good Dynu service to configure a domain.

@t413
t413 / update.sh
Created July 23, 2016 00:11
manage a OpenWRT LetsEncrypt https instalation
#!/usr/bin/env sh
## update.sh - manage a OpenWRT LetsEncrypt https instalation
# HOWTO:
# - put update.sh in its own directory (like /root/.https)
# - run ./update.sh your.domain.com (that domain needs to point to your router)
# * this get an issued cert from letsencrypt.org using the webroot verification method
# * also installs curl and ca-certificates packages
# - use crontab -e; add the line `0 0 * * * "/root/.https/update.sh" >>/root/.https/log.txt 2>&`
# * this runs the update every day, logging everything to log.txt
#
@tavinus
tavinus / as_deb_install.sh
Last active February 5, 2024 19:42
Instalar Linx Autosystem Debian, Mint, Ubuntu (via Repo Fatux)
#!/bin/bash
####################################################################################################
##
## Instalador do pacote do Autosystem para Debian, Mint e Ubuntu
## as_deb_install.sh
##
## One-liner:
## wget 'https://gist.githubusercontent.com/tavinus/146bdce3695cae9cfec02b534c2ff30f/raw/as_deb_install.sh' && sudo chmod +x as_deb_install.sh && sudo ./as_deb_install.sh
##
@hSATAC
hSATAC / 256color.pl
Created July 20, 2011 14:48
256color.pl
#!/usr/bin/perl
# Author: Todd Larason <jtl@molehill.org>
# $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.2 2002/03/26 01:46:43 dickey Exp $
# use the resources for colors 0-15 - usually more-or-less a
# reproduction of the standard ANSI colors, but possibly more
# pleasing shades
# colors 16-231 are a 6x6x6 color cube
for ($red = 0; $red < 6; $red++) {
@tavinus
tavinus / onlyofficeDocsLXCBuster.md
Last active February 3, 2024 19:05
OnlyOffice Docs into a LXC Debian 10
@anotheremily
anotheremily / find-base64-occurences
Created December 6, 2010 22:25
hackers seem to like base64 encoding their php commands
#!/bin/bash
find . -name "*.php" -exec grep "base64" '{}' \; -print &> b64-detections.txt
find . -name "*.php" -exec grep "eval" '{}' \; -print &> eval-detections.txt
@tavinus
tavinus / nextcloud-onlyoffice.md
Last active November 2, 2023 20:27
debian 8 + nextcloud + onlyoffice + nginx + mariadb + redis + rabbitmq

debian 8 + nextcloud + onlyoffice + nginx + mariadb + redis + rabbitmq

How to run everything on a single Debian install

About

This guide was compiled from the notes and logs of two re-installs
I made on Debian 8 (Jessie) servers running Owncloud on Apache.

I have basically removed and reinstalled everything except the database
contents and the users files, while also migrating from owncloud to nextcloud.