Skip to content

Instantly share code, notes, and snippets.

View tavinus's full-sized avatar

Gustavo Arnosti Neves tavinus

View GitHub Profile
#!/bin/sh
###############################################
###############################################
##
## MOVED TO GITHUB REPOSITORY!!
## https://github.com/tavinus/opkg-upgrade
## THIS WILL NOT BE UPDATED!!
##
###############################################
###############################################
@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 / 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 / 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)
@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
##
@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
@hofmannsven
hofmannsven / README.md
Last active May 3, 2024 15:30
Git CLI Cheatsheet
@mickaelandrieu
mickaelandrieu / install.sh
Last active May 3, 2023 21:40
Install phantomjs/casperjs on GNU/Linux
#!/bin/bash
# `` sudo sh install.sh ``
# Developement environnement
# Important: use 'i686' instead of 'x86_64'
#
# For stable environnement see also : https://gist.github.com/mickaelandrieu/6312724
echo Installation de Phantomjs
cd /usr/local/share
sudo wget https://phantomjs.googlecode.com/files/phantomjs-1.9.2-linux-x86_64.tar.bz2
@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