Skip to content

Instantly share code, notes, and snippets.

View njmyers's full-sized avatar
👨‍💻
Working

Nicholas Myers njmyers

👨‍💻
Working
  • New York City
View GitHub Profile
@njmyers
njmyers / vm-secureboot.md
Created July 4, 2019 21:07 — forked from gabrieljcs/vm-secureboot.md
Instructions on signing VirtualBox and VMware modules for Secure Boot

Signing VirtualBox & VMware modules

Source

Creating a key

You can change "MOK".priv/.der to any desired name; "CN=" MUST hold your username, signing the modules may not work otherwise (on shim, possibly due to a bug).

$ openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=John Doe/"
@njmyers
njmyers / local.conf
Last active December 17, 2022 05:50
Use apple fonts as defaults for fontconfig users
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- pixel alignment rgba -->
<!-- check it here http://www.lagom.nl/lcd-test/subpixel.php -->
<match target="font">
<edit name="rgba" mode="assign">
<const>rgb</const>
</edit>
</match>
@njmyers
njmyers / nvm_noninteractive.sh
Last active January 23, 2018 22:05
Download NVM for Non-Interactive Shell
#!/usr/bin/env bash
# remove all exports in .bashrc
sed -i 's/export NVM_DIR="$HOME\/.nvm"//g' $HOME/.bashrc
sed -i 's/\[ -s "$NVM_DIR\/nvm.sh" \] && . "$NVM_DIR\/nvm.sh" # This loads nvm//g' $HOME/.bashrc
sed -i 's/\[ -s "$NVM_DIR\/bash_completion" \] && \\. "$NVM_DIR\/bash_completion" # This loads nvm bash_completion//g' $HOME/.bashrc
# add exports for nvm to top of shell
printf 'export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm