Skip to content

Instantly share code, notes, and snippets.

@NetOpWibby
NetOpWibby / access.svelte
Last active August 22, 2021 21:18
Sapper session handling (creation and updating). Idk if this is the best way of doing things but at least it *works*. Feel free to scrutinize this code and let me know all the ways it sucks.
<script>
// import
import { onMount } from "svelte";
// util
import { metadata } from "~util";
// redirect
onMount(() => {
// `location.replace` forces a hard refresh in the browser,
@Brainiarc7
Brainiarc7 / VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
Last active May 18, 2025 15:48
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".

@cornelius-keller
cornelius-keller / docker-bridge.service
Last active September 1, 2017 19:39
Scripts and systemd units to run tinc and flannel on coreos
# there is surely a much better way to do this using sytemd/networkd
[Unit]
Description=Configure Docker Bridge
Requires=docker.service
#After=docker.socket
[Service]
Type=oneshot
#ExecStartPre=-/bin/sh -c "route del -net 10.1.0.0 netmask 255.255.0.0 dev tap0"
ExecStartPre=/bin/sh -c "while ! ifconfig -s | grep -q tap0 ; do sleep 1; done"
ExecStartPre=/bin/sh -c "while ! ifconfig -s | grep -q docker0 ; do sleep 1; done"
@tsutsu
tsutsu / HOWTO-CoreOS-on-DO.md
Last active September 25, 2016 09:14
CoreOS on DigitalOcean (using "Debian 7 x64" as a base)
  1. run sudo apt-get install squashfs-tools kexec-tools
  2. copy "update.sh" to /usr/sbin/update-coreos, and make it executable
  3. copy "create-docker-store.sh" to /usr/sbin/create-coreos-docker-store, and make it executable
  4. copy "cloud-config.yml" to /etc/default/coreos, modifying it to suit your preferences
  5. run sudo update-coreos -d
  6. reboot
@crashdump
crashdump / Template Freeswitch.xml
Created December 4, 2013 16:02
Freeswitch - Zabbix Monitoring
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>2.0</version>
<date>2013-12-04T16:01:36Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
@crashdump
crashdump / Template CouchDB.xml
Last active February 28, 2024 15:04
CouchDB / BigCouch - Zabbix Monitoring
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>2.0</version>
<date>2013-12-03T16:57:07Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>