Skip to content

Instantly share code, notes, and snippets.

@puffybsd
puffybsd / settings.json
Last active March 18, 2024 02:16
executorMap for vscode code runner rust files. Checks if the directory is examples and executes current file, or performs a standard cargo run.
"code-runner.executorMap": {
"rust": "if [ $(basename $dir) = 'examples' ]; then cargo run --example $fileNameWithoutExt; else cargo run; fi",
}
@puffybsd
puffybsd / delete_svc_pods.sh
Created December 30, 2018 19:39
Delete pods associated with a svc if you don't have a label.
kubectl delete pods -l pod-template-hash=d47bb1234
@puffybsd
puffybsd / update_secret.sh
Created December 30, 2018 19:29
Hack to update a kubernetes secret so that kubectl doesn't complain about missing apiVersion and kind
cat <(printf 'apiVersion: v1\nkind: Secret\n') \
<(kubectl create secret generic apikey --from-literal=TOKEN=mys3cr3t -o yaml --dry-run) \
| kubectl apply -f -
@puffybsd
puffybsd / launch.json
Last active July 7, 2022 11:56
VSCode launcher for rust using lldb
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Debug-LLDB",
"type": "lldb",
"request": "launch",