Skip to content

Instantly share code, notes, and snippets.

View dkam's full-sized avatar

Dan Milne dkam

View GitHub Profile
@dkam
dkam / compile-ffmpeg.sh
Created August 18, 2020 12:38 — forked from wildrun0/compile-ffmpeg.sh
Compiling ffmpeg for Raspberry Pi 4
#!/bin/bash
# Note that there's no libdrm because this lib cause errors
sudo apt update -y && sudo apt upgrade -y
sudo apt-get -y install \
autoconf \
automake \
build-essential \
@dkam
dkam / WEBRick Cert generation
Last active October 5, 2015 20:15 — forked from nickyp/self_signed_cert.rb
create a self-signed certificate using ruby-openssl
# From https://github.com/ruby/ruby/blob/trunk/lib/webrick/ssl.rb
require 'openssl'
def create_self_signed_cert(bits, cn, comment)
rsa = OpenSSL::PKey::RSA.new(bits){|p, n|
case p
when 0; $stderr.putc "." # BN_generate_prime
when 1; $stderr.putc "+" # BN_generate_prime
when 2; $stderr.putc "*" # searching good prime,
# n = #of try,