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 / 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_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 / kill-idle-vnc.sh
Last active May 20, 2018 01:29 — forked from mnebuerquo/kill-idle-vnc.sh
place in /etc/cron.hourly and it will kill any idle vnc sessions from http://serverfault.com/a/767361/33170
#!/bin/bash
# file-name: kill-idle-vnc.sh
# Author: Maxwel Leite (http://needforbits.wordpress.com/)
# Initial Author: Sherman Adelson (https://gist.github.com/mnebuerquo)
# Description: Script to kill any idle vnc sessions (for disconnected xrdp sessions)
# SRC: http://serverfault.com/a/767361/33170
displays=`ps aux | grep Xvnc | grep -v 'grep\|sed' | sed -r 's|.*(Xvnc :[0-9]*).*|\1|' | cut -d' ' -f 2`
limit=30 # in minutes
@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