Skip to content

Instantly share code, notes, and snippets.

View bjoern-r's full-sized avatar

Björn bjoern-r

  • Berlin; Germany
View GitHub Profile
@robinsmidsrod
robinsmidsrod / ubuntu-amd64-installer.ipxe
Created March 27, 2012 08:52
Boot Ubuntu x64 installer directly from the network. Only iPXE needed
#!ipxe
dhcp
echo Starting Ubuntu x64 installer for ${hostname}
set base-url http://archive.ubuntu.com/ubuntu/dists/lucid/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64
kernel ${base-url}/linux
initrd ${base-url}/initrd.gz
#imgargs linux auto=true url=http://yourserver/some/path/preseed.cfg
boot ||
# If everything failed, give the user some options
echo Boot from ${base-url} failed
@xkr47
xkr47 / letsencrypt-jetty.sh
Last active June 26, 2024 09:03
How to use Letsencrypt certificate & private key with Jetty
# input: fullchain.pem and privkey.pem as generated by the "letsencrypt-auto" script when run with
# the "auth" aka "certonly" subcommand
# convert certificate chain + private key to the PKCS#12 file format
openssl pkcs12 -export -out keystore.pkcs12 -in fullchain.pem -inkey privkey.pem
# convert PKCS#12 file into Java keystore format
keytool -importkeystore -srckeystore keystore.pkcs12 -srcstoretype PKCS12 -destkeystore keystore.jks
# don't need the PKCS#12 file anymore
@ridencww
ridencww / SerialPrintf.txt
Last active August 25, 2024 19:34
Basic printf functionality for the Arduino serial ports
/*
* Simple printf for writing to an Arduino serial port. Allows specifying Serial..Serial3.
*
* const HardwareSerial&, the serial port to use (Serial..Serial3)
* const char* fmt, the formatting string followed by the data to be formatted
*
* int d = 65;
* float f = 123.4567;
* char* str = "Hello";
* serial_printf(Serial, "<fmt>", d);
@max-mapper
max-mapper / readme.md
Last active March 16, 2023 15:18
Video stabilization using VidStab and FFMPEG (Mac OS X)

Video stabilization using VidStab and FFMPEG

Examples here use the default settings, see the VidStab readme on GitHub for more advanced instructions.

Here's an example video I made

Install ffmpeg with the vidstab plugin from homebrew

brew install ffmpeg --with-libvidstab
@rectalogic
rectalogic / ipsec2wireshark.py
Last active June 3, 2021 05:12
Parse spis and keys from "ip xfrm state" output and generate a Wireshark ESP decryption config that can decrypt an ESP capture.
#!/usr/bin/env python
"""
Runs "ip xfrm state" and outputs lines to be added to ~/.wireshark/esp_sa
This process must be run using sudo.
This allows Wireshark to decrypt ipsec traffic captured with 'sudo tcpdump -vni any -U -w /tmp/esp.pcap "ip proto 50"'
"""
import sys
import subprocess
@Brainiarc7
Brainiarc7 / ffmpeg-livestream-to-streaming-sites-vaapi-nvenc.md
Last active August 18, 2024 02:58
ffmpeg livestreaming to youtube via Nvidia's NVENC and Intel's VAAPI on supported hardware

Streaming your Linux desktop to Youtube and Twitch via Nvidia's NVENC and VAAPI:

Considerations to take when live streaming:

The following best practice observations apply when using a hardware-based encoder for live streaming to any platform:

  1. Set the buffer size (-bufsize:v) equal to the target bitrate (-b:v). You want to ensure that you're encoding in CBR mode.

  2. Set up the encoders as shown:

@braian87b
braian87b / dumb-ap-wired-link.sh
Last active October 23, 2024 23:13
How to setup a Dumb AP, Wired backbone for OpenWRT / LEDE
@Brainiarc7
Brainiarc7 / ffmpeg-vp8&9-encode-test-vaapi-intel.md
Last active December 31, 2023 02:19
PSA: You can now use FFmpeg's VAAPI-based VP8 and VP9 encoder on Skylake+ systems on Linux: Tested on Ubuntu 16.04LTS

Build VAAPI with support for VP8/9 decode and encode hardware acceleration on a Skylake validation testbed:

Build platform: Ubuntu 16.04LTS.

First things first:

Install baseline dependencies first

sudo apt-get -y install autoconf automake build-essential libass-dev libtool pkg-config texinfo zlib1g-dev libva-dev cmake mercurial libdrm-dev libvorbis-dev libogg-dev git libx11-dev libperl-dev libpciaccess-dev libpciaccess0 xorg-dev intel-gpu-tools

@derpeter
derpeter / gist:306452b1b6a8c569690a43de49145d8b
Last active October 22, 2017 09:41
reencode unsupported audio codec to a second audio track
ffmpeg -y -i in.mkv -map 0:v -c:v copy -map 0:a:0 -c:a:0 copy -map 0:a:0 -c:a:0 ac3 out.mkv
@derpeter
derpeter / reencode.sh
Created October 14, 2017 01:50
reencode all video files in an folder that a bigger than a configured value to save disk space
#!/bin/bash
MIN_SIZE=6G
IN_DIR=.
OUT_DIR=out
find $IN_DIR -maxdepth 1 -type f -size +$MIN_SIZE -exec ffmpeg -y -i {} -c:v libx264 -preset slow -tune film -profile:v high -level 4.2 -crf 23 -c:a copy -c:s copy $OUT_DIR/{} \;