Skip to content

Instantly share code, notes, and snippets.

View K1ll3rF0x's full-sized avatar
🎯
Focusing

Toni Dahl K1ll3rF0x

🎯
Focusing
View GitHub Profile
@K1ll3rF0x
K1ll3rF0x / gpg-import-and-export-instructions.md
Created March 14, 2022 05:49 — forked from chrisroos/gpg-import-and-export-instructions.md
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...

@K1ll3rF0x
K1ll3rF0x / http-server.bb
Last active March 10, 2021 10:28 — forked from holyjak/http-server.bb
Babashka HTTP server for serving static files, similar to `python -m http.server` but more flexible :)
#!/usr/bin/env bb
#_" -*- mode: clojure; -*-"
;; Based on https://github.com/babashka/babashka/blob/master/examples/image_viewer.clj
;; and https://gist.github.com/holyjak/36c6284c047ffb7573e8a34399de27d8
(ns http-server
(:require [babashka.fs :as fs]
[clojure.java.browse :as browse]
[clojure.string :as str]
[clojure.tools.cli :refer [parse-opts]]
@K1ll3rF0x
K1ll3rF0x / tmux-cheatsheet.markdown
Created August 4, 2020 06:25 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@K1ll3rF0x
K1ll3rF0x / lambda-slack-echo.js
Created January 24, 2018 11:12 — forked from sunils34/lambda-slack-echo.js
Lambda Slack Echo Blueprint
/*
This function handles a Slack slash command and echoes the details back to the user.
Follow these steps to configure the slash command in Slack:
1. Navigate to https://<your-team-domain>.slack.com/services/new
2. Search for and select "Slash Commands".
3. Enter a name for your command and click "Add Slash Command Integration".
4. Copy the token string from the integration settings and use it in the next section.
5. After you complete this blueprint, enter the provided API endpoint URL in the URL field.
Follow these steps to encrypt your Slack token for use in this function:
1. Create a KMS key - http://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html.