Skip to content

Instantly share code, notes, and snippets.

Author: Kukks

New protocol design: Discrete Payments through Wabisabi coinjoins and Nostr ecnrypted communication

  1. Merchant creates invoice of 0.1BTC
  2. Merchant generates a unique key for invoice
  3. Merchant shows the pubkey of (2), a recommended nostr relay uri
  4. Customer generates a unique key for this invoice payment
  5. Customer posts an encrypted event addressed to pubkey of (3) with a message stating intent to pay invoice of 0.1BTC using a specific wabisabi coordinator
@zajdee
zajdee / Digital-Green-Certificate-Dump.py
Last active November 5, 2021 19:15
A simple tool to dump the European Union's COVID passports (Digital Green Certificates)
#!/usr/bin/env python3
# install dependencies:
# pip install base45 cbor2 (cwt - not used here)
import sys
import zlib
from base45 import b45decode
from cbor2 import loads
@borekb
borekb / synology-shutdown-temperature.md
Last active November 14, 2024 14:25
How to increase the shutdown temperature on Synology NAS

Synology: how to increase shutdown temperature

My Synology DS218+ runs with a single SSD disk that has an operating temperature range of 0–70 °C, which is common for SSDs. Synology, however, has a default shutdown temperature of 61 °C, probably due to HDDs and some lazy programming.

I'm a very light user of NAS – all I want is a network attached storage and silence. My DS218+ has one 2 TB SSD disk in it and I've changed the system fan for a quieter / slower one.

Everything runs fine but about once in a month, I get this notification:

[Synology DS218+]Synology shut down due to disk overheating. >

@duairc
duairc / net.nix
Last active October 31, 2024 06:06
IP address arithmetic and validation in Nix
{ lib ? null, ... }:
let
net = {
ip = {
# add :: (ip | mac | integer) -> ip -> ip
#
# Examples:
@mfikes
mfikes / yes.md
Created November 23, 2019 21:46
Running ClojureScript on Espruino

With src/foo/core.cljs:

(ns foo.core)

(defn calculate []
 (let [xform (comp (map inc) (filter odd?) (take 123))]
   (transduce xform + (iterate inc 0))))

(js/print (calculate))
@michaellihs
michaellihs / gitlab_access_token.md
Last active November 11, 2024 15:29
Create Gitlab Personal Access Token using curl

Create Gitlab Personal Access Token using curl

Prerequisites

  • You need a Gitlab server up and running
  • You need user credentials for a (admin) user on the Gitlab server
  • You need curl and Perl on your server
@dev-zzo
dev-zzo / airband.md
Last active October 11, 2019 19:49
Airband receiver

Airband receivers

Heya all! I was asked to write up a document on how to build your own autonomous airband ACARS receiver and join the club. Before you start shelling out moneys, though, I recommend checking whether there is any plane activity in your area: go visit your favourite plane spotting site (e.g. flightradar24) and observe air traffic for awhile; if there's nothing flying above for the whole day, there is no big point in setting up.

My big thanks extends to Thierry and Hugo who helped to beta test this document. :-)

Without any further delay, let's dive.

To build a working receiver, you will need:

@naddeoa
naddeoa / xps-touchscreen-workaround.service
Last active February 14, 2024 22:03
I just got an XPS and I ran into the issue where the touch screen stops working after resume. After doing a little digging, I was able to find out that this is fixed in the Linux kernel by a developer named Mika Westerberg. I got in touch with him and he was able to set me off on the right track for developing a proper work around that I could u…
[Unit]
Description=Potentially dangerous fix touchscreen after resume on the XPS 13 9350
After=suspend.target
[Service]
Type=simple
ExecStart=/home/anthony/path/to/xps-touchscreen-workaround.sh
[Install]
WantedBy=suspend.target
@atoponce
atoponce / gist:07d8d4c833873be2f68c34f9afc5a78a
Last active September 7, 2024 18:11 — forked from tqbf/gist:be58d2d39690c3b366ad
Cryptographic Best Practices

Cryptographic Best Practices

Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.

The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from

@DanyHenriquez
DanyHenriquez / disable_tracker.sh
Created June 7, 2016 10:20
Disable tracker Ubuntu 16.04
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-extract.desktop
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-miner-apps.desktop
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-miner-fs.desktop
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-miner-user-guides.desktop
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-store.desktop
gsettings set org.freedesktop.Tracker.Miner.Files crawling-interval -2
gsettings set org.freedesktop.Tracker.Miner.Files enable-monitors false
tracker reset --hard