Skip to content

Instantly share code, notes, and snippets.

View calbrecht's full-sized avatar

Christian Albrecht calbrecht

View GitHub Profile
@calbrecht
calbrecht / CX20-container.nix
Last active June 20, 2017 16:39
nixops hetzner mailserver
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# Version 2, December 2004
{
ngse = { config, pkgs, ... }: rec
{
deployment.targetEnv = "container";
deployment.container = {
host = "localhost";
clientPublicKey = "~/.ssh/id_nixops.pub";
clientPrivateKey = "~/.ssh/id_nixops";
@calbrecht
calbrecht / 01_setup
Last active October 13, 2018 08:48
Comparison of NelmioApiDocBundle branch refactor-swagger vs. master
I took https://github.com/etraxis/etraxis, setup and symlinked the vendor/nelmio/api-doc-bundle to the local checkout of the repo,
and ran the project with ./bin/console server:start
cd ~/ws/NelmioApiDocBundle
git checkout refactor-swagger
curl http://127.0.0.1:8000/api/doc | \
sed -u -n -e 's/<script id="swagger-data" type="application\/json">\(.*\)<\/script>/\1/p' | jq -S '.' > refactor_swagger.json
git checkout master
@calbrecht
calbrecht / research.txt
Created April 14, 2020 05:17
libvirt windows guest
# https://heiko-sieger.info/creating-a-windows-10-vm-on-the-amd-ryzen-9-3900x-using-qemu-4-0-and-vga-passthrough/
# Virtualization in BIOS
# Intel VTx, AMD SVM
# IOMMU in BIOS
# Intel VT-d, AMD-Vi
# https://ark.intel.com/content/www/us/en/ark/search/featurefilter.html?productType=873&0_VTD=True&1_Filter-Family=122139
# https://ark.intel.com/content/www/us/en/ark/products/88192/intel-core-i7-6600u-processor-4m-cache-up-to-3-40-ghz.html
@calbrecht
calbrecht / xdp-screen-cast.py.sh
Created December 29, 2020 09:48
xdp-screen-cast.py from https://gitlab.gnome.org/snippets/19 made work on nixos through nix-shell
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p "python3.withPackages(ps: [ ps.dbus-python ps.gst-python ])" pipewire gst_all_1.gst-plugins-base gobject-introspection
import re
import signal
import dbus
from gi.repository import GLib
from dbus.mainloop.glib import DBusGMainLoop
import gi
gi.require_version('Gst', '1.0')