Skip to content

Instantly share code, notes, and snippets.

View tavinus's full-sized avatar

Gustavo Arnosti Neves tavinus

View GitHub Profile
@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
@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++) {
@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
@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
@hofmannsven
hofmannsven / README.md
Last active May 3, 2024 15:30
Git CLI Cheatsheet
@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 / 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
##
@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 / 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)
@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