Skip to content

Instantly share code, notes, and snippets.


Anders Weijnitz aweijnitz

View GitHub Profile

Reading List

This is my attempt at collecting links and notes to myself to check. My current system is mailing links to myself, which is not really working well.

Virtualization, Deployment, DevOps

Firecracker - Secure and fast microVMs for serverless computing

Firecracker enables you to deploy workloads in lightweight virtual machines, called microVMs, which provide enhanced security and workload isolation over traditional VMs, while enabling the speed and resource efficiency of containers. Firecracker was developed at Amazon Web Services to improve the customer experience of services like AWS Lambda and AWS Fargate.

aweijnitz /
Last active Feb 27, 2020
Install OpenWhisk on Minikube using Helm
# Assuming the following is installed and available
# - minikube installed and started
# - helm installed
# - OpenWhisk CLI, wsk, installed (not configured)
# - git clone
# Clean up: In case you have a previously failed install, remove it from the cluster with the following line
# kubectl delete namespace openwhisk
# Create a namespace to deploy into
aweijnitz /
Created Feb 24, 2020
Start docker with latest node for local development
docker run -it --rm -p 5000:5000 -v $(pwd):/api -w="/api" node bash
aweijnitz / kubernetes-basics
Last active Feb 19, 2020
kubernetes basics with minikube
View kubernetes-basics
# Installation (Mac)
brew update; brew install minikube
minikube version
minikube start
# kubectl
kubectl version
aweijnitz /
Created Nov 3, 2019
Shell script to run as a cron job and "run command" to prevent motionEyeOS from filling up the /data partition
CURRENT=$(df /data/output | grep /dev | awk '{ print $5}' | sed 's/%//g')
if [ "$CURRENT" -gt "$THRESHOLD_CLEAN" ] ; then
find /data/output -type f -mtime +3 -exec rm -f {} \;
if [ "$CURRENT" -gt "$THRESHOLD_FULL" ] ; then
aweijnitz / .bash_profile
Created Nov 10, 2017 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
View .bash_profile
# ---------------------------------------------------------------------------
# Description: This file holds all my BASH configurations and aliases
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
aweijnitz /
Created Jun 7, 2017
Install CS.Cart on Ubuntu 14.04
# Based on
curl -sL | bash -s --
cd /var/www/html/
wget "" -O && unzip
chown -R service ./
chmod 644 config.local.php
chmod -R 755 design images var
find design -type f -print0 | xargs -0 chmod 644
find images -type f -print0 | xargs -0 chmod 644
aweijnitz / sqlite3_example.js
Last active Feb 26, 2017
Example how to use SQLite with Node.js
View sqlite3_example.js
* Small refresher on how to use sqlite3 embedded in node.js
* - Package: (NOTE: Includes correct platform binary of sqlite3. No extra install required.)
* - API:
var sqlite3 = require('sqlite3').verbose();
// var db = new sqlite3.Database('./dbfiles/testdb');
aweijnitz /
Last active Aug 5, 2018
Music from /dev/urandom on Mac OSX
# I really enjoyed "Bash One Liner - Compose Music From Entropy in /dev/urandom"
# From
# This is a collection of one liners that work on Mac OSX
# You need sox
brew install sox
# Major scale
cat /dev/urandom | hexdump -v -e '/1 "%u\n"' | awk '{ split("0,2,4,5,7,9,11,12",a,","); for (i = 0; i < 1; i+= 0.0001) printf("%08X\n", 100*sin(1382*exp((a[$1 % 8]/12)*log(2))*i)) }' | xxd -r -p | sox -v 0.25 -traw -r16000 -b32 -e signed-integer - -tcoreaudio
aweijnitz /
Last active Jul 19, 2020
Installing CUPS printer on Debian and add PDF printer
sudo apt-get -y install cups
sudo apt-get -y install cups-pdf
# add pdf printer to cups
# - named files end up in ~/PDF/
# - unnamed files are stored in /var/spool/cups-pdf/ANONYMOUS/, such as PDF:s created by streaming bytes over an API
sudo lpadmin -p cups-pdf -v cups-pdf:/ -E -P /usr/share/ppd/cups-pdf/CUPS-PDF.ppd
You can’t perform that action at this time.