Skip to content

Instantly share code, notes, and snippets.

View tavinus's full-sized avatar

Gustavo Arnosti Neves tavinus

View GitHub Profile
@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)
#!/bin/sh
###############################################
###############################################
##
## MOVED TO GITHUB REPOSITORY!!
## https://github.com/tavinus/opkg-upgrade
## THIS WILL NOT BE UPDATED!!
##
###############################################
###############################################
@tavinus
tavinus / diff-git.sh
Last active October 16, 2019 07:59
Use git-diff as diff in OpenWRT / LEDE
#!/bin/sh
##############################################################
# Gustavo Arnosti Neves
#
# Provides a diff-git shortcut in /usr/bin/diff-git
#
# Required: GIT
# # opkg install git
#
# You may install diffutils for the simplified diff
@tavinus
tavinus / opkg-do-upgradable.sh
Last active December 13, 2019 22:00
OpenWRT / LEDE quick and dirty packages upgrade
#!/bin/sh
###############################################
# Gustavo Arnosti Neves
# May / 2017
#
# Upgrade packages listed by:
# opkg list-upgradable
#
# This Script:
# https://gist.github.com/tavinus/997d896cebd575bfaf1706ce6e701c2d
@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 / 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 / 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;
@noplanman
noplanman / upgrade-nghttp2
Last active November 17, 2020 23:50
Upgrade nghttp2 for brew with a fix for older MacOS versions
#!/usr/bin/env bash
# Update brew repo.
printf "%s" "Updating brew repo..."
brew update &> /dev/null
echo "✅"
# Get the currently installed and new version of nghttp2.
printf "%s" "Fetch installed and stable nghttp2 versions..."
VERSION_INSTALLED="$(brew list --versions | grep nghttp2 | awk '{print $2}')"
@shark0der
shark0der / README.md
Created November 14, 2022 09:09
Disable WhatsApp automatic emoji conversion

Disable WhatsApp automatic emoji conversion

The script works by patching the webpack chunks instead of manipulating the DOM.

@tavinus
tavinus / nextcloud_cron_tweaks.md
Last active December 24, 2022 12:29
Nextcloud Cron Tweaks

Making Nextcloud's Cron Behave

Nextcloud needs frequent background jobs to keep running properly.

Depending on the situation this "cron job" may take a very long time, overlapping with the default 5 minute delay between jobs. Which may end up running several instances of the job.

To mitigate this we have 2 options:

  • Use a systemd service+timer
  • Encapsulate the cronjob into a bash script that checks if it is already running

The systemd approach has official support and will (by default) not run on top of a previous run (if still running).