Skip to content

Instantly share code, notes, and snippets.

View AuHau's full-sized avatar

Adam Uhlíř AuHau

View GitHub Profile
@AuHau
AuHau / gpg-encrypt-me.fish
Created November 17, 2021 10:49
GPG encryption for all primary's keys subkeys
function gpg-encrypt-me
if not set -q GPG_ME
echo "No your's GPG key set in GPG_ME variable!"
end
set recipients (gpg --list-keys --with-colons --fast-list-mode $GPG_ME | awk -F: '/^sub/{if ($12 == "e") {printf "-r 0x%s! ", $5}}')
gpg -r $recipients --armor --encrypt $argv
end
@AuHau
AuHau / 1-bee-connection.ts
Last active October 25, 2021 14:54
Pastebee CLI blog post
import { Bee } from '@ethersphere/bee-js'
const BEE_URL = process.env.BEE_URL || 'http://localhost:1633'
const BEE_STAMP = process.env.BEE_STAMP
async function main(): Promise<void> {
if(!BEE_STAMP) throw new Error ('You have to configure Postage Stamp env. variable BEE_STAMP!')
const bee = new Bee(BEE_URL)
const result = await bee.uploadFile(BEE_STAMP, 'Hello world Swarm!')
@AuHau
AuHau / PGP Subkey refresh.md
Last active June 28, 2021 16:10
Steps on how to prolong my subkeys on Yubikey

PGP Subkey refresh for Yubikey

This is my workflow and might not be applicable to yours. I am not rotating subkeys but only extending their expiration.

  1. Boot to Tails
  2. Go to the place of backedup GPG folder and run export GNUPGHOME="$(pwd)"
  3. gpg --list-keys
  4. export KEY="<<KEYID>>"
  5. gpg --edit-key $KEY
  6. key 1 and repeat for 2 and 3
@AuHau
AuHau / whoami.json
Last active February 7, 2020 15:46
whoami.json
{"id": "67baf7ffd3644806405fd498b6e40e8cd5a53b0936baacff851db700bf39078544a096c156797353b88319340a6a424dd721f931d0310c41744f8bfddb6d626d"}
@AuHau
AuHau / mkdocs.yaml
Last active February 11, 2019 15:59
Single-page Material MkDocs documentation
site_name: 'Single-page documentation'
extra_css:
- 'stylesheets/one-page.css'
@AuHau
AuHau / overlaid_image.py
Last active July 27, 2018 21:39
Extended ImageField that enables to overlay the image with color layer
from PIL import Image
from django.db.models import ImageField
# Hacking ImageCropping to display correct widget
try:
from image_cropping import widgets
from image_cropping.backends.base import ImageBackend
ImageBackend.WIDGETS['OverlaidImageField'] = widgets.ImageCropWidget
except ModuleNotFoundError:

Keybase proof

I hereby claim:

  • I am auhau on github.
  • I am auhau (https://keybase.io/auhau) on keybase.
  • I have a public key whose fingerprint is 2EB6 3CBF 3667 DECC BE61 CAFE E87B 404D 2A06 1A3C

To claim this, I am signing this object: