Skip to content

Instantly share code, notes, and snippets.

View stefano-garzarella's full-sized avatar

Stefano Garzarella stefano-garzarella

View GitHub Profile
@crobinso
crobinso / sev_with_luks.md
Last active January 23, 2024 13:53
SEV-ES with LUKS

Kickstart file to install Fedora 37 with luks encrypted root

  • login is root:root
  • luks passphrase is MY-LUKS-PASSPHRASE
  • /etc/crypttab setup to autounlock LUKS when we inject SEV secret

luks.ks:

rootpw --plaintext root
firstboot --disable
timezone America/New_York --utc
@imbushuo
imbushuo / simplevm.c
Last active April 8, 2024 07:06
Demonstrates Hypervisor.Framework usage in Apple Silicon
// simplevm.c: demonstrates Hypervisor.Framework usage in Apple Silicon
// Based on the work by @zhuowei
// @imbushuo - Nov 2020
// To build:
// Prepare the entitlement with BOTH com.apple.security.hypervisor and com.apple.vm.networking WHEN SIP IS OFF
// Prepare the entitlement com.apple.security.hypervisor and NO com.apple.vm.networking WHEN SIP IS ON
// ^ Per @never_released, tested on 11.0.1, idk why
// clang -o simplevm -O2 -framework Hypervisor -mmacosx-version-min=11.0 simplevm.c
// codesign --entitlements simplevm.entitlements --force -s - simplevm
@rroohhh
rroohhh / client.sh
Created February 3, 2017 21:21
gstreamer udp audio streaming
#!/bin/bash
gst-launch-1.0 -v udpsrc uri=udp://239.1.1.1:5000 caps="application/x-rtp,channels=(int)2,format=(string)S16LE,media=(string)audio,payload=(int)96,clock-rate=(int)44100,encoding-name=(string)L24" ! rtpL24depay ! audioconvert ! autoaudiosink sync=false
/*
* PCI tutorial
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of