Skip to content

Instantly share code, notes, and snippets.

yongkyuns /
Created Jul 7, 2020
FFMPEG usage in rust using command and raw pixels
use std::io::prelude::*;
use std::process::{Command, Stdio};
fn main() {
let mut child = Command::new("ffmpeg")
// Overwrite file if it already exists
// Interpret the information from stdin as "raw video" ...
View certPolicy.ps1
Add-Type @"
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class TrustAllCertsPolicy : ICertificatePolicy {
public bool CheckValidationResult(
ServicePoint srvPoint, X509Certificate certificate,
WebRequest request, int certificateProblem) {
return true;
Last active Jan 26, 2022
Allow multiple Origins für phpList
Hack: Allow multiple Origins
z.B. für Ajax-Anmeldung von Subdomain
platziere dies zu oberst in /lists/config/config.php
phracker /
Created Aug 5, 2018
Unpack XIP on Linux

Unpacking XIP files on Linux:

  1. Install xar from
  2. Install pbzx from (use gcc -llzma -lxar -I /usr/local/include pbzx.c -o pbzx and copy the binary into your PATH)
  3. use xar -xf XIP_FILE -C /path/to/extract/to
  4. Change to the directory where you extracted the file.
  5. Use pbzx -n Content | cpio -i to extract the contents.
nuriel77 /
Created Apr 23, 2017
Do libvirt snapshot for domain and define how many recent snapshots to keep
#!/usr/bin/env python
import argparse
import libvirt
import logging
import time
import sys
import os
from pprint import pformat
from heapq import nlargest
sphaero /
Last active Sep 20, 2021
Gstreamer seamless loop test
#/usr/bin/env python3
# Seamless loop test
# Copyright (c) 2015 Arnaud Loonstra <>
# This is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
toabctl /
Last active Nov 2, 2021
Listen for libvirt events
import libvirt
import sys
# virDomainEventType is emitted during domain lifecycles (see libvirt.h)
lg3bass / padVideosTo16:9
Last active May 31, 2022
ffmpeg to pad videos to 16:9
View padVideosTo16:9
ffmpeg -i PAN_17-1_Final.m4v -filter:v 'pad=max(iw\,ih*(16/9)):ow/(16/9):(ow-iw)/2:(oh-ih)/2' -aspect 16:9 PAN_17-1_Final_auto1.m4v
//works but calculates manually (pad=<width output>:<height output>:<x upper-left-corner>:<y upper-left-corner>
ffmpeg -i PAN_17-1_Final.m4v -filter:v 'pad=939:528:22:0' PAN_17-1_Final_PADTEST2.m4v