Skip to content

Instantly share code, notes, and snippets.

View tavinus's full-sized avatar

Gustavo Arnosti Neves tavinus

View GitHub Profile
@tavinus
tavinus / acme-proxmox-dynu.md
Last active March 18, 2025 20:49
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.

@tavinus
tavinus / chmod-howto.md
Last active September 2, 2020 03:04
Chmod How-To

CHMOD numbers list

Each chmod SUM NUMBER means:

1 > --x
2 > -w-  
3 > -wx (2 + 1)
4 > r--
5 > r-x (4 + 1)
@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.

@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
@tavinus
tavinus / cloudsend.sh
Last active January 11, 2026 12:57
Send files to Nextcloud/Owncloud shared folder using curl
#!/usr/bin/env bash
############################################################
# MIGRATED TO REPOSITORY
# https://github.com/tavinus/cloudsend.sh
#
# This gist will NOT be updated anymore
############################################################
############################################################
@tavinus
tavinus / gist:faef5d04516e8df266bee375fb9c4369
Created September 26, 2018 06:36 — forked from cdown/gist:1163649
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
[a-zA-Z0-9.~_-]) printf "$c" ;;
@tavinus
tavinus / grab-html-source.js
Created September 30, 2018 06:58 — forked from iwek/grab-html-source.js
grab html source in casperjs or phantomjs
//phantomjs
var page = require('webpage').create();
var url = 'http://instagram.com/';
page.open(url, function (status) {
var js = page.evaluate(function () {
return document;
});
console.log(js.all[0].outerHTML);
phantom.exit();
@tavinus
tavinus / lsexec.sh
Last active October 3, 2018 03:27
List only executable files (and not folders)
#!/bin/bash
# List only executable files
# Will ignore folders
# Gustavo Arnosti Neves
# https://github.com/tavinus
# Usage ./lsexec.sh
# ./lsexec.sh <path>
@tavinus
tavinus / pdfSplit.sh
Last active January 27, 2023 01:55
Split each PDF page into a new PDF
#!/bin/bash
################################################################
#
# Gustavo Arnosti Neves
# https://github.com/tavinus
#
# Usage ./pdfSplit.sh file.pdf
# ./pdfSplit.sh -c 20 file.pdf # if page count fails
#
@tavinus
tavinus / pdfSplit.bat
Last active January 30, 2025 11:09
Split PDFs Windows (ghostscript)
@echo off
chcp 65001 >NUL
setlocal enabledelayedexpansion
:: THIS SCRIPT
:: https://gist.github.com/tavinus/44bd6bf3d20204d654b6d5fe52342741
:: Works from CLI or Drag and Drop
:: GhostScript Download:
:: https://www.ghostscript.com/download.html