Skip to content

Instantly share code, notes, and snippets.

View mdheller's full-sized avatar
🐢

mdheller mdheller

🐢
View GitHub Profile
@mdheller
mdheller / steamdeck_scripts.md
Created July 5, 2023 04:08 — forked from pudquick/steamdeck_scripts.md
Running shell scripts easily in Gaming mode on Steam Deck

Running shell scripts easily in Gaming mode on Steam Deck

(Alternatively: "How I stopped using Syncthing on Steam Deck")

Disclaimer: As the title implies, this is about shell scripting on your Steam Deck. The guide won't teach you how to do that part, it assumes you already have ideas in mind about what scripts you'd want to write. Stopping the usage of Syncthing was what I wanted to do with it, but you can do whatever you like.

Background (you can skip this part)

If you're an avid gamer who picked up a Steam Deck and now you're splitting your time between it and a more traditional gaming computer (or in my case, several other gaming systems as well), you may come across a situation where at some point you want to start doing more advanced things on your Steam Deck - which may mean "how do I get files onto or off of this thing".

@mdheller
mdheller / self_signed.sh
Created July 5, 2023 04:08 — forked from pudquick/self_signed.sh
Non-interactive self-signed unencrypted keypair generation for HTTPS for arbitrary domain with SAN
# Make a self-signed private/public keypair usable for HTTPS, including SAN / Subject Alternative Name and CN / Common Name, non-interactively and without additional files
# Parentheses around the command spin it up in a subshell so that the FQDOMAIN variable is local to execution and doesn't persist after it's created
(FQDOMAIN="example.local" && openssl req -x509 -nodes -newkey rsa:4096 -keyout server_key.pem -keyform PEM -days 365 -subj "/CN=${FQDOMAIN}" -addext 'basicConstraints=CA:FALSE' -addext "subjectAltName=DNS:${FQDOMAIN}" -addext 'keyUsage=digitalSignature' -addext 'extendedKeyUsage=serverAuth' -out server_cert.pem -outform PEM 2>/dev/null)
# Alternatively, if you're setting FQDOMAIN somewhere else, you can just run directly:
openssl req -x509 -nodes -newkey rsa:4096 -keyout server_key.pem -keyform PEM -days 365 -subj "/CN=${FQDOMAIN}" -addext 'basicConstraints=CA:FALSE' -addext "subjectAltName=DNS:${FQDOMAIN}" -addext 'keyUsage=digitalSignature' -addext 'extendedKeyUsage=serverAuth' -out server_
@mdheller
mdheller / static-files-dynamic-compressor.sc
Created December 6, 2022 01:29 — forked from ckmahoney/static-files-dynamic-compressor.sc
Creating a dynamic compressor applied from two standard audio files in SuperCollider.
/**
Here we create a "sidechain compressor" effect.
Given two audio files, we are able to have one of the files change its volume in response to the other.
This is an extremely useful and versatile effect: All professional music mastering involves dynamic compression
at many scales.
In contemporary and art music, it is applied lightly. In dance music and popular styles, it is often heavy.
This is a heavy example, for drastic effect. Here we are:
### Keybase proof
I hereby claim:
* I am mdheller on github.
* I am greatscleroose (https://keybase.io/greatscleroose) on keybase.
* I have a public key ASDrsDgL8G3SQrrxuoJ96x1QcAWYoWHIA7O4m6bhF32UBwo
To claim this, I am signing this object:
@mdheller
mdheller / SteveYeggeGooglePlatformRant.md
Created September 4, 2020 03:37
SteveYeggeGooglePlatformRant.md

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@mdheller
mdheller / .zshrc
Created August 25, 2020 07:23 — forked from andersonaguiar/.zshrc
My personal zsh and tmux configurations
# Path to your oh-my-zsh installation.
export ZSH=/Users/dimitar.danailov/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
# ZSH_THEME="robbyrussell"
ZSH_THEME="agnoster"
@mdheller
mdheller / worker.js
Created August 4, 2020 12:03
Serverless Geolocation Service, hosted on Cloudflare Workers
/*
* Serverless Geolocation Service, hosted on Cloudflare Workers.
*/
// https://gist.github.com/maephisto/9228207
const isoCountries = {
'AF' : 'Afghanistan',
'AX' : 'Aland Islands',
'AL' : 'Albania',

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real