Skip to content

Instantly share code, notes, and snippets.

View trinitronx's full-sized avatar
⛩️
Zazen

James Cuzella trinitronx

⛩️
Zazen
View GitHub Profile
@steven2358
steven2358 / ffmpeg.md
Last active May 1, 2024 23:11
FFmpeg cheat sheet
@z1nkum
z1nkum / graphite-grafana-statsd-inside-docker.md
Last active May 10, 2023 08:43
Run graphite-stack inside docker via docker-compose
# getenforce
Disabled

Also we need docker, docker-compose, certbot (if you need LetEncrypt)

mkdir -p /opt/graphite/conf /opt/graphite/data /opt/graphite/storage /opt/statsd /opt/grafana/log

/etc/docker/compose/graphite/docker-compose.yml

@kafene
kafene / gpg-wkd.md
Last active April 12, 2024 19:14
Setting up WKD for self-hosted automatic key discovery

I just got this working so I figured I'd share what I found, since there's hardly any information about this anywhere online except an RFC, the GPG mailing list and one tutorial from the GnuPG blog.

You can use automatic key discovery with WKD (Web key directory) to make it easy for users to import your key, in GPG since version 2.1.12. Since this feature is fairly new, it isn't yet available in the current LTS release of Ubuntu (16.04; xenial), however it is available in Debian stable (stretch).

I couldn't add a DNS CERT or DANE / OPENPGPKEY record through my email service (which also hosts my nameservers). I tried making the PKA record - a foo._pka.example.com TXT record but GPG doesn't seem to recognize it and fails; I'm still investigating why.

So the last option for self-hosted auto-discovery was WKD.

First thing I had to do was add an email address to my key. My primary UID is just my name so the key represents my identity rather

@bossjones
bossjones / 30-init-dbus
Created June 30, 2017 23:22
Trying to make "cont-init.d/30-init-dbus" similar to "init_dbus.sh"
#!/usr/bin/execlineb -P
# NOTE: cont-init.d/30-init-dbus
# -*- mode: bash -*-
# vi: set ft=bash:
with-contenv
trap -x
{
@croxton
croxton / SSL-certs-OSX.md
Last active March 3, 2024 18:58 — forked from leevigraham/Generate ssl certificates with Subject Alt Names on OSX.md
Generate ssl certificates with Subject Alt Names

Generate ssl certificates with Subject Alt Names on OSX

Open ssl.conf in a text editor.

Edit the domain(s) listed under the [alt_names] section so that they match the local domain name you want to use for your project, e.g.

DNS.1   = my-project.dev

Additional FQDNs can be added if required:

@tegansnyder
tegansnyder / Flushing DNS cache macOSX Sierra.sh
Created December 29, 2016 15:30
Flushing DNS cache macOSX Sierra
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder;say flushed
@droidfivex
droidfivex / install.sh
Created December 17, 2016 15:09
work with rootkitxperia-20140719 on Linux
#!/bin/bash
echo "--- Xperia rootkit 2014/07/19 ---"
echo "waiting for device..."
adb wait-for-device
for file in `ls files`
do
adb push files/$file /data/local/tmp/
@cdemers
cdemers / CoreOS_install_socat.sh
Last active September 14, 2017 19:08
Install the socat binary into a CoreOS installation
# Insightful instructions, originally posted by Xynova (https://github.com/xynova)
# Make socat directories
mkdir -p /opt/bin/socat.d/bin /opt/bin/socat.d/lib
# Create socat wrapper
cat << EOF > /opt/bin/socat
#! /bin/bash
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/opt/bin
LD_LIBRARY_PATH=/opt/bin/socat.d/lib:$LD_LIBRARY_PATH exec /opt/bin/socat.d/bin/socat "\$@"
@Brainiarc7
Brainiarc7 / VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
Last active March 26, 2024 18:18
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.

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".

#!/usr/bin/python
''' Not my script, found on the Internet, and rediscovered on my hard drive
'''
import sys
def cidr_to_regex(cidr):
ip, prefix = cidr.split('/')
base = 0
for val in map(int, ip.split('.')):