Skip to content

Instantly share code, notes, and snippets.

View geekteq's full-sized avatar

Mattias Pettersson geekteq

View GitHub Profile
@geekteq
geekteq / compile-ffmpeg-nvenc.sh
Last active June 11, 2020 10:21
This bash script will compile a static Ffmpeg build with NVENC and VAAPI hardware-accelerated support on Ubuntu in your home directory. You can modify the script to customize the build options as you see fit.
#!/bin/bash
#install required things from apt
#updated for Ubuntu 18.04 and added YASM, SSL-support, SRT, AOM, X265, Patched X264 to get rid of keyintmin becoming "keyint/2+1"
# NOTE: This is currently not doing it's job so unless this message disappears don't try it :)
#forked from original here - https://gist.github.com/Brainiarc7/3f7695ac2a0905b05c5b
whoami="$(whoami)"
checkubuntuversion(){
. /etc/os-release
ubunturequirement="18.04"
version=$(echo $VERSION_ID)
@geekteq
geekteq / update-ufw.sh
Created March 21, 2017 14:24
update dynamic IP in UFW ssh access
#!/bin/bash
HOSTNAME=dynamic.domain.com
LOGFILE=$HOME/ufw.log
Current_IP=$(host $HOSTNAME | head -n1 | cut -f4 -d ' ')
if [ ! -f $LOGFILE ]; then
/usr/sbin/ufw allow from $Current_IP to any port 22 proto tcp
echo $Current_IP > $LOGFILE
else
@geekteq
geekteq / back-res.sh
Created January 30, 2017 12:36 — forked from zekus/back-res.sh
a backup script for ispconfig-3
#!/bin/bash
version="0.9.4 from 2010-09-13"
# Always download the latest version here: http://www.eurosistems.ro/back-res
# Thanks or questions: http://www.howtoforge.com/forums/showthread.php?t=41609
#
# CHANGELOG:
# -----------------------------------------------------------------------------
# version 0.9.4 - 2010-09-13
# --------------------------
# Small fix: - Corrected small bug replaced tar with $TAR in the recovery line