Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
if [ ! -f /dev/mapper/rootfs ]; then
cryptsetup luksOpen /dev/sdb rootfs
fi
mkdir -p /mnt/gentoo
mount /dev/mapper/rootfs /mnt/gentoo
mount /dev/sda /mnt/gentoo/boot/efi
@mackncheesiest
mackncheesiest / Form2Contact.gs
Last active October 10, 2020 18:27
Google Apps Script for listening for form submissions and turning those into contacts with a particular label
/* Set this label to match whatever label you want the contacts to be grouped under */
const CONTACT_LABEL = "CONTACT LABEL";
const TRIGGER_PROP = "TRIGGER_ID";
const NONAME_PROP = "NO_NAME_GIVEN";
const MENU_LABEL = "Form2Contact";
/*
* Clears the TRIGGER_PROP property so that the registration menu pops up again (in case i.e. permissions change and we need to re-register the script)
*/
@mackncheesiest
mackncheesiest / Windows WSL SSH Startup
Last active December 20, 2019 17:03
Bash+Powershell scripts to start up Windows-based SSH agent in WSL as necessary
--- Bash Profile Check and Invocation ---
export USER=""
export SSH_AUTH_SOCK=/mnt/c/users/${USER}/.ssh/ssh-agent.sock
check_sshagent() {
if ! ssh-add -l 2>&1 1>/dev/null; then
touch /mnt/c/users/${USER}/.ssh/.customlock
powershell.exe -command "Start-Process -Verb RunAs powershell.exe -Args '-executionpolicy bypass -file', \"C:\Users\${USER}\.ssh\start-ssh.ps1\""
printf "Waiting for password entry in powershell"
while [ -f /mnt/c/users/${USER}/.ssh/.customlock ]; do
@mackncheesiest
mackncheesiest / keybase.md
Created September 30, 2019 21:36
keybase

Keybase proof

I hereby claim:

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

To claim this, I am signing this object: