Skip to content

Instantly share code, notes, and snippets.

Avatar

h1z1

View GitHub Profile
@h1z1
h1z1 / nginx1subapp.md
Created Jan 4, 2021 — forked from esfand/nginx1subapp.md
Nginx Location Ruels
View nginx1subapp.md

Serving multiple webapps from different folders

November 29, 2011 developmentNginx

Few days ago I had to add a wordpress installation within the same environment where a Codeigniter app was already running happily and undisturbed.

It took me a while to figure out how to keep separate folders on the filesystem, and serve the blog from a subfolder of the main domain:

@h1z1
h1z1 / mpvctl
Created Dec 17, 2020 — forked from dwgill/mpvctl
A small script for controlling mpv via the JSON IPC. Intended to resemble playerctl.
View mpvctl
#!/usr/bin/env bash
# This script requires:
# - that the directory $HOME/.mpv exist
# - that the program socat be installed
# - that you start mpv with the unix socket feature pointing at that directory
# I recommend an alias in your .bashrc or equivalent file:
# alias mpv="mpv --input-unix-socket=$HOME/.mpv/socket"
socket="$HOME/.mpv/socket"
View AuthyToOtherAuthenticator.md

Generating Authy passwords on other authenticators


There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.

Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes (beware, through Google) for you to use on your favorite authenticator.

His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My gues

@h1z1
h1z1 / stuns
Created Apr 13, 2020 — forked from yetithefoot/stuns
STUN+TURN servers list
View stuns
{url:'stun:stun01.sipphone.com'},
{url:'stun:stun.ekiga.net'},
{url:'stun:stun.fwdnet.net'},
{url:'stun:stun.ideasip.com'},
{url:'stun:stun.iptel.org'},
{url:'stun:stun.rixtelecom.se'},
{url:'stun:stun.schlund.de'},
{url:'stun:stun.l.google.com:19302'},
{url:'stun:stun1.l.google.com:19302'},
{url:'stun:stun2.l.google.com:19302'},
View gist:9ef2343a96b95de57c68911bc55e336a
TAG-gitrev | TAG | file/version
-----------+------+--------------------------------------------------------------------
n0.10-0-g7e16636995|n0.10|libavcodec/version.h:#define LIBAVCODEC_VERSION_MAJOR
n0.10-0-g7e16636995|n0.10|libavcodec/version.h:#define LIBAVCODEC_VERSION_MINOR 60
n0.10-0-g7e16636995|n0.10|libavcodec/version.h:#define LIBAVCODEC_VERSION_MICRO 100
n0.10-0-g7e16636995|n0.10|libavfilter/version.h:#define LIBAVFILTER_VERSION_MINOR 60
n0.10-0-g7e16636995|n0.10|libavfilter/version.h:#define LIBAVFILTER_VERSION_MICRO 100
n0.10-0-g7e16636995|n0.10|libavformat/version.h:#define LIBAVFORMAT_VERSION_MINOR 31
n0.10-0-g7e16636995|n0.10|libavformat/version.h:#define LIBAVFORMAT_VERSION_MICRO 100
n0.10.1-0-gd39b183d8d|n0.10.1|libavcodec/version.h:#define LIBAVCODEC_VERSION_MAJOR 53
@h1z1
h1z1 / VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md This gist contains instructions on setting up FFmpeg and Libav to use VAAPI-based hardware accelerated encoding (on supported platforms) for H.264 (and H.265 on supported hardware) video formats.
View VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md

Using VAAPI's hardware accelerated video encoding on Linux with Intel's hardware on FFmpeg and libav

Hello, brethren :-)

As it turns out, the current version of FFmpeg (version 3.1 released earlier today) and libav (master branch) supports full H.264 and HEVC encode in VAAPI on supported hardware that works reliably well to be termed "production-ready".