Skip to content

Instantly share code, notes, and snippets.

View alexellis's full-sized avatar
📖
Check out my eBook on Go

Alex Ellis alexellis

📖
Check out my eBook on Go
View GitHub Profile
@alexellis
alexellis / OpenFaaS-libkrun-Fedora33.md
Created March 14, 2021 18:57 — forked from slp/OpenFaaS-libkrun-Fedora33.md
Installing OpenFaaS with libkrun-based isolation on Fedora 33

Installing OpenFaaS with libkrun-based isolation on Fedora 33

Setting up the system

Revert to cgroup v1

The version of containerd that OpenFaaS will download during the installation doesn't support cgroup v2, so we need to configure systemd to avoid using the Unified cgroup Hierarchy, and reboot the system:

@alexellis
alexellis / setFans.sh
Last active April 1, 2021 09:31 — forked from ppouliot/setFans.sh
Script to set the fan speed on Ampere server
#! /bin/sh
# Alex Ellis 18th Nov 2020
# Updated for the 1U unit, which has 7 fans
logo () {
echo ""
echo " ▄██▄"
echo " ▄█ █▄"
echo " ▄█ █▄"
@alexellis
alexellis / timelapse.md
Created March 9, 2017 08:48 — forked from porjo/timelapse.md
ffmpeg time-lapse

Convert sequence of JPEG images to MP4 video

ffmpeg -r 24 -pattern_type glob -i '*.JPG' -i DSC_%04d.JPG -s hd1080 -vcodec libx264 timelapse.mp4

  • -r 24 - output frame rate
  • -pattern_type glob -i '*.JPG' - all JPG files in the current directory
  • -i DSC_%04d.JPG - e.g. DSC_0397.JPG
  • -s hd1080 - 1920x1080 resolution

Slower, better quality

@alexellis
alexellis / install-docker-master.sh
Last active August 31, 2023 21:52 — forked from BretFisher/copy-paste.txt
install docker engine for swarm3k on Ubuntu 16.04. 2 options for installing
#!/bin/sh
# option 2: paste this into user-data to automate install via boot script
# NOTE: update --label=owner=YOURNAME below if you want to easily identify yours
# renames the host to have a suffix of alexellisio
export original=$(cat /etc/hostname)
sudo hostname $original-master-alexellisio
echo $original-master-alexellisio | sudo tee /etc/hostname
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
@alexellis
alexellis / main.go
Created September 9, 2016 21:20 — forked from lizrice/main.go
Container from scratch
package main
// @lizrice, mostly copied from @doctor_julz: https://gist.github.com/julz/c0017fa7a40de0543001
import (
"fmt"
"os"
"os/exec"
"syscall"
)
@alexellis
alexellis / consul.lua
Created May 15, 2016 08:16 — forked from gmr/consul.lua
Dynamic Nginx upstream nodes using Consul
module("resty.consul", package.seeall)
_VERSION = '0.1.0'
function service_nodes(service)
local http = require "resty.http"
local json = require "cjson"
local hc = http:new()
local upstream = ""