Skip to content

Instantly share code, notes, and snippets.

@maxwelleite
maxwelleite / latest-widevine.sh
Created April 4, 2018 19:37 — forked from neelshearer/latest-widevine.sh
Depending on architecture, either grabs last 32-bit Widevine from chromium or fetches Chrome and extracts out Widevine so that it can be used by Vivaldi. Also works with other Chromium-based browsers, see guide below.
#!/usr/bin/env bash
available () {
command -v $1 >/dev/null 2>&1
}
# Make sure we have wget or curl
if available wget; then
SILENT_DL="wget -qO-"
LOUD_DL="wget"
@maxwelleite
maxwelleite / greasemonkey-zorinos-start-page-field-focus.js
Created March 5, 2018 14:00
Zorin OS Start Page Field Focus - Simple Greasemonkey/Violentmonkey/TamperMonkey script to autofocus the field on "Zorin OS Start Page" (https://zorinos.com/start/)
// ==UserScript==
// @name Zorin OS Start Page Field Focus
// @description Simple Greasemonkey/Violentmonkey/TamperMonkey script to autofocus the field on "Zorin OS Start Page / Search Google"
// @namespace http://www.openjs.com/
// @include https://zorinos.com/start/
// @author Maxwel Leite
// @namespace https://gist.github.com/maxwelleite
// @encoding utf-8
// @version 1.0
// @updateURL
@maxwelleite
maxwelleite / update-hosts.sh
Created March 4, 2018 14:03 — forked from Eliastik/update-hosts.sh
A quick shell script that will automatically update a Linux HOSTS file to block domains (ads, malwares, ...). Support multiple hosts sources and initial host file.
#!/bin/bash
# Filename: update-hosts.sh
#
# Author: George Lesica <george@lesica.com>
# Enhanced by Eliastik ( eliastiksofts.com/contact )
#
# Description: Replaces the HOSTS file with hosts lists from Internet,
# creating a backup of the old file. Can be used as an update script.
#
@maxwelleite
maxwelleite / ffmpeg-updater.sh
Last active August 21, 2017 01:41
Simple bash script to install the latest static version of FFmpeg (from http://ffmpeg.gusari.org/static/)
#!/bin/bash
# Author: Maxwel Leite
# Website: http://needforbits.wordpress.com/
# Description: Simple bash script to install the latest static version of FFmpeg (from http://ffmpeg.gusari.org/static/)
# Dependencies: wget
# Tested: Ubuntu Saucy
if [[ $EUID -ne 0 ]]; then
echo -e "You must be a root user!\nTry: sudo ./ffmpeg-update.sh" 2>&1
exit 1
@maxwelleite
maxwelleite / firefox-language-installer.sh
Last active August 21, 2017 01:39
Script to automatic download, install and configure the language pack on Firefox [Ubuntu/Debian distros]
#!/bin/bash
# Author: Maxwel Leite
# file-name: firefox-language-installer.sh
# Website: http://needforbits.wordpress.com/
# Description: Script to automatic download, install and configure the language pack on Firefox [Ubuntu/Debian distros]
# Dependencies: firefox-mozilla-build (Ubuntuzilla Repository) or firefox (obvious!) and wget
# Tested: Ubuntu 14.04 (Trusty), 13,10 (Saucy)
# License: GPLv3
# Note: Also works with Firefox installed from compressed tarball (ex: firefox-33.1.1.tar.bz2)
# TODO: Test in Debian
@maxwelleite
maxwelleite / ffmpeg_installer
Created August 14, 2017 00:04 — forked from joglomedia/ffmpeg_installer
Simple Bash Script to Install FFMPEG + Required Libraries in Ubuntu 14.04
#!/bin/bash
# Bash Script to Install FFMPEG in Ubuntu 14.04
# Ref: http://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
# Opsional: install exiftool: apt-get install libimage-exiftool-perl
#
# Author: Edi Septriyanto http://masedi.net <hi@masedi.net>
########################################################################
CURDIR=$(pwd)
@maxwelleite
maxwelleite / km-0416.ini
Last active March 21, 2017 19:05
Configuração com teclas especiais (Alt+Gr, Cima,Baixo...) para o teclado português-BR para quem utiliza xrdp ou x11rdp - Fonte/tutorial: http://amartinstechnet.blogspot.com.br/2016/09/configurar-teclado-lxde-abnt2-x11rdp.html For more configuration files from another languages: http://c-nergy.be/blog/?p=3858
[noshift]
Key8=0:0
Key9=65307:27
Key10=49:49
Key11=50:50
Key12=51:51
Key13=52:52
Key14=53:53
Key15=54:54
Key16=55:55
@maxwelleite
maxwelleite / getlibs
Last active August 29, 2015 14:12 — forked from linuxundich/getlibs
#!/bin/bash
#The MIT License
#
#Copyright (c) 2007 Cappy
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#copies of the Software, and to permit persons to whom the Software is
@maxwelleite
maxwelleite / functions-str.sh
Created November 25, 2014 15:47
Collection of useful string functions for BASH programming
#!/bin/bash
# Author: Maxwel Leite
# file-name: functions-str.sh
# Website: http://needforbits.tumblr.com/
# Description: Collection of useful string functions for BASH programming
# License: GPLv3
# Description: Remove leading and trailing whitespace characters
# @param string source string
# usage: result="$(trim " a b c d ")"
@maxwelleite
maxwelleite / mediatomb-wipe-db.sh
Last active August 29, 2015 13:57
Forces to wipe/cleanup entire database of MediaTomb (UPnP Media Server - DLNA)
#!/bin/bash
#
# Author: Maxwel Leite
# Website: http://needforbits.tumblr.com/
#
# Description:
# Forces to wipe/cleanup entire database of MediaTomb (UPnP Media Server - DLNA)
#
# Dependencies: sqlite3
#