Skip to content

Instantly share code, notes, and snippets.

View MattVonVielen's full-sized avatar

Matt Campbell MattVonVielen

View GitHub Profile
@MattVonVielen
MattVonVielen / README.md
Last active October 17, 2024 19:17
Creating an Ubuntu Desktop 22.04 (ARM64) VM on an M3 Mac

Creating an Ubuntu Desktop 22.04 (ARM64) VM on an M3 Mac

n.b. You'll likely need 3D Hardware Acceleration in order to make screen resizing work without making the VM freeze or become unstable; this seemed to be the case Under Virtualbox 7, however enabling 3D acceleration there causes the VM to hard-crash the hypervisor (or at least the VM instance) during boot. I was eventually able to successfully create a usable VM in both UTM and VMWware Fusion.

  1. Download the latest ARM64 Ubuntu Server installer ISO and use it to install Ubuntu Server with no workloads selected.
  2. sudo apt update
  3. sudo apt -y upgrade
@MattVonVielen
MattVonVielen / FooTest.cs
Created August 8, 2018 23:08
C# - embed JSON sample data in test assembly
public static T LoadJsonFromResource<T>(string resourceName) where T: class
{
using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName))
{
if (stream == null) return null;
using (var sr = new StreamReader(stream))
{
using (var reader = new JsonTextReader(sr))
{

Keybase proof

I hereby claim:

  • I am xenolinguist on github.
  • I am xenolinguist (https://keybase.io/xenolinguist) on keybase.
  • I have a public key ASDOAFakXBZGzXg9qstD2VqFVytSNl8L4X5gPphkz8tcTgo

To claim this, I am signing this object:

@MattVonVielen
MattVonVielen / Berksfile
Created February 24, 2014 21:13
Self-taught Vagrant surgery using Redmine as the victim
site :opscode
cookbook 'apt'
cookbook 'mysql'
@MattVonVielen
MattVonVielen / gist:3407325
Created August 20, 2012 20:02
How I built my first build lamp

How I built my first build lamp

NOTE: Links are provided for reference purposes only; no product or vendor endorsement is expressed or implied

Ingredients

X10 modules

  • 2 x "SocketRocket" light bulb socket module (LM15A)
  • 1 x Transceiver Module (TM751)
  • 1 x "Firecracker" Serial Adapter (CM17A)
@MattVonVielen
MattVonVielen / autotest.ps1
Created August 14, 2012 05:13
Erlang autotest in Windows PowerShell
function Reference-Assembly($Name) {
[void] [System.Reflection.Assembly]::LoadWithPartialName($Name)
}
Reference-Assembly System.Windows.Forms
Reference-Assembly System.Drawing
function Decode-IconGraphic {
$encodedIcon = "
AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAgAAAAA