Skip to content

Instantly share code, notes, and snippets.

@nvk
nvk / qr.py
Last active October 9, 2023 21:40
QR codes on terminal for passing things to phone…
#!/usr/bin/env python3
import sys, pyqrcode
p = ' '.join(sys.argv[1:])
if not p:
p = sys.stdin.read().strip()
if not p:
print(f"Usage: {sys.argv[0]} data-for-qr or echo 'data-for-qr' | {sys.argv[0]}")
sys.exit(1)
@nvk
nvk / contacts_query.sh
Created September 12, 2022 18:59 — forked from agoldst/contacts_query.sh
Query macOS contacts for mutt
#!/bin/bash
#
# contacts_query.sh
# Andrew Goldstone, July 2017. All yours to use or modify, but no promises.
#
# The mutt e-mail client has an option to query an external address book for
# e-mail addresses. On a Mac it is nice to be able to query the Address Book
# (now known as Contacts). For a while I used a utility called contacts
# (http://gnufoo.org/contacts) but this stopped working under Sierra. There is
# an official API for querying Contacts as a unified datastore, but it is only
@nvk
nvk / pro-decentralization-link-list.md
Created September 20, 2021 12:28 — forked from chris-belcher/pro-decentralization-link-list.md
pro-decentralization-link-list
@nvk
nvk / bitcoin.conf
Last active November 21, 2021 21:10
noob barebones config
# run server
server=1
listen=0
# prune the node
prune=10000
# Tor it
onion=127.0.0.1:9050
listenonion=1
@nvk
nvk / signing-gpg-keys.md
Created June 26, 2019 13:33 — forked from F21/signing-gpg-keys.md
Signing someone's GPG key

This is a quick guide of the commands we use to sign someone's GPG key in a virtual key signing party.

Note: The steps cover only the technical aspects of signing someone's key. Before signing someone's key, you must verify their identity. This is usually done by showing government-issued ID and confirming the key's fingerprint

The commands will work for both GPG and GPG2.

I use Julian's key for the examples. His key id is 2AD3FAE3. You should substitute with the appropriate key id when running the commands.

Signing the key

  1. List the keys currently in your keyring: gpg --list-keys.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
4cae21e4fd64e3ffba6d3dd3bc245ff4bf130a9499fc64a045d47abff87e25df ChangeLog.md
486650befffd5a7256cf54fde0e65911d780c54c7c08ff534533e97d9aa520ff 2019-04-04T1323-v2.0.1-coldcard.dfu
f740d787e3daa5154f221aa463b0f3bdee93a8d3c1042b30733ae5a72faccfa9 2019-04-03T1450-v2.0.0-coldcard.dfu
5a7df5850f238e3ac5f5764f7af9b418e1a25e256409b55c45eec63c481fc581 2019-02-12T1409-v1.2.0-coldcard.dfu
76c7df67fa52fd915d0d4d7039c40e9333ed7100616797d9208ea7bc5e61d5cb 2018-11-26T1403-v1.1.0-coldcard.dfu
9656aa50766ab385e78baa2bc487319db882757dabd3bb1a4028b7c4529a1c6d 2018-09-11T1428-v1.0.2-coldcard.dfu
47e0655fb7a7b3509303eb1829a67543eeea7f1288cffa3e78ceb3207207304e 2018-09-05T1728-v1.0.1-coldcard.dfu
@nvk
nvk / mastodon-proof.md
Created August 10, 2018 16:32
nvk's mastodon ID proof

Signed ID:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

I'm https://bitcoinhackers.org/@nvk
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE2A7110s7OMrD8rvWHJ4DPGxlhgYFAlttuLkACgkQHJ4DPGxl
@nvk
nvk / Coinkite Payment Button JWT Token Encoding with PHP
Last active August 29, 2015 14:27
Unofficial JWT Token Encoding with PHP for Coinkite's Payment Button
#
# Coinkite's documentation https://docs.coinkite.com/api/buttons.html
#
# Unofficial code sent to use by a user:
# Here is php sample code you may post on your site to do this whole JWT thing without any libraries:
#
1000, 'c' => 'USD'); //YOUR BUTTON OVERRIDE OPTIONS
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
Verifying that +nvk is my Bitcoin username. You can send me #bitcoin here: https://onename.io/nvk