Skip to content

Instantly share code, notes, and snippets.

View tavinus's full-sized avatar

Gustavo Arnosti Neves tavinus

View GitHub Profile
@tavinus
tavinus / nc-files_texteditor-install.md
Last active June 15, 2022 16:22
Nextcloud Disable Text App and install old Text Editor

Revert Nextcloud's Text Editor

Unfortunatelly the new Nextcloud Text App is not yet usable in production because it does not support plain text editing very well and breaks the exibition and editing of many plain text formats. It may also cause data loss when trying to format some file types (this may not be the case anymore, check the devs).

Seems like the main issue is to align the Colaboration with the rich/raw modes. But there are other problems as well.

In any case, we will just disable the current Text app and manually install the old App.

Disable Text App

  • Click on Your icon > Apps
@tavinus
tavinus / install_acmesh_using_git.md
Last active December 4, 2019 01:05
Install acme.sh using Git and create certificates using Dynu DNS

Base install / run

Get root shell

$ sudo su -

Install git and socat if needed (e.g.)

# apt install git socat

Create work folder (/root/src)

@tavinus
tavinus / as_clean_install.sh
Last active September 16, 2020 14:25
Autosystem Cleaner install
#!/bin/bash
####################################################################################################
##
## Instalador AutoSystem Cleaner para Debian, Mint e Ubuntu
## as_clean_install.sh
##
## One-liner:
## wget 'https://gist.githubusercontent.com/tavinus/24d0ddcb3b8ded9372756a41c8bcaf3d/raw/as_clean_install.sh' && sudo chmod +x as_clean_install.sh && sudo ./as_clean_install.sh
##
@tavinus
tavinus / simpleColors.sh
Last active December 6, 2023 23:55
"universal" terminal colors
#!/bin/sh
# Gustavo Arnosti Neves - Dec 2018
# Modified from many other snippets
# Adapted to work virtually anywhere
# Works on busybox/ash
# This script: https://gist.github.com/tavinus/925c7c9e67b5ba20ae38637fd0e06b07
# SO reference: https://stackoverflow.com/questions/16843382/colored-shell-script-output-library
@tavinus
tavinus / pdfSplit.bat
Last active March 9, 2020 11:57
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
@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 / 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 / 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 / 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 / cloudsend.sh
Last active July 24, 2023 11:58
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
############################################################
############################################################