Skip to content

Instantly share code, notes, and snippets.

View d4v3y0rk's full-sized avatar
💥
Working from home

Dave York d4v3y0rk

💥
Working from home
View GitHub Profile
@d4v3y0rk
d4v3y0rk / terminal.settings
Created June 21, 2021 23:58
terminal.settings
[org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9]
custom-command='/usr/bin/zsh'
default-size-columns=115
font='MesloLGM NF 14'
scrollback-unlimited=true
use-custom-command=true
use-system-font=false
use-theme-colors=false
const csv = require('csvtojson')
const fs = require('fs')
// this no worky
function dosomething(data) {
console.log(data)
}
async function main() {
var mappingData = await parseCSV("map.csv", ",")
@d4v3y0rk
d4v3y0rk / howto.md
Created March 14, 2020 13:04
Encryption with DM_CRYPT in WSL2

Encrypted Volumes in WSL2

Description

This is a quick guide on how to setup dm_crypt under WSL2 for working with encrypted volumes. I use an encrypted volume to store things like password recovery codes and 2nd factor backup codes etc. I recently switched over to using WSL2 and wanted to figure out how to enable this functionality there. This is the distilled howto for getting it to work.

Guide

First thing you have to do is create a custom WSL2 kernel. Inside your already installed and running WSL2 (ubuntu) installation:

  • Install some required packages.

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@d4v3y0rk
d4v3y0rk / verify.sh
Last active August 29, 2015 14:23
shell script to do md5 hash match verification
#!/bin/bash
HASH=`md5 $2 | awk '{print $4}'`
if [ $1 == $HASH ]; then
echo "hashes match" && exit 0;
else echo "hashes are different" && exit 1;
fi
@d4v3y0rk
d4v3y0rk / subl
Created January 8, 2015 15:09
subl shell script
#!/bin/sh
SUBL="/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"
if [ ! -e "$SUBL" ] ; then
echo "Sublime not found: $SUBL"
exit 1
fi
"$SUBL" --new-window -wait $1 &