Skip to content

Instantly share code, notes, and snippets.

View dunxen's full-sized avatar
🇿🇦
In South Africa

dunxen dunxen

🇿🇦
In South Africa
View GitHub Profile
@instagibbs
instagibbs / ptlc-notes.md
Last active September 23, 2024 03:06
PTLCs for LN

Messaging Changes

I am assuming minimal changes to commitment transaction structure, essentially swapping out HTLC for PTLC, so no fast-forward schemes here.

Here are output labels because I get confused so often what things in BOLTs mean:

  • (a) a_o_atx_* Alice-offered "offered PTLC" in Alice's tx
  • (b) a_o_btx_* Alice-offered "received PTLC" in Bob's tx
  • (c) b_o_atx_* Bob-offered "received PTLC" in Alice's tx
  • (d) b_o_btx_* Bob-offered "offered PTLC" in Bob's tx
@kconner
kconner / macOS Internals.md
Last active November 13, 2024 07:51
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

Onion messages rate-limiting

During the recent Oakland Dev Summit, some lightning engineers got together to discuss DoS protection for onion messages. Rusty proposed a very simple rate-limiting scheme that statistically propagates back to the correct sender, which we describe in details below.

Nodes apply per-peer rate limits on incoming onion messages that should be relayed (e.g. N/seconds with some burst tolerance). It is recommended to allow more onion messages from peers with whom you have channels, for example 10/seconds when you have a channel and 1/second when you don't.

@sekcompsci
sekcompsci / Comparison Espressif ESP MCUs.md
Last active November 15, 2024 03:20 — forked from fabianoriccardi/Comparison Espressif ESP MCUs.md
Comparison chips (SoCs) table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6. Forked from @fabianoriccardi

Comparison chips (SoCs) table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

A minimal table to compare the Espressif's MCU families.

ESP8266 ESP32 ESP32-S2 ESP32-S3 ESP32-C3 ESP32-C6
Announcement Date 2014, August 2016, September 2019, September 2020, December
@0xB10C
0xB10C / shell.nix
Last active March 28, 2024 16:35
Nix shell for Bitcoin Core development (moved to https://github.com/0xB10C/nix-bitcoin-core)
# MOVED:
# To enable better collboration, I've moved the shell.nix to https://github.com/0xB10C/nix-bitcoin-core.
# Older revisions remain avaiable here.
# https://gist.github.com/0xB10C/1fd0d4a68bf96914775b1515340926f8/revisions
#
#
#
#
#
#
@andrebrait
andrebrait / keychron_linux.md
Last active November 7, 2024 08:48
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

Problems With Using Parentheses for Type Argument Lists

Changes to the syntax of type parameters have been suggested multiple times by now. And while there may be a point to make about readability, function declarations using type parameters as described in the proposal will stay unambiguous. However, ambiguity arises when it comes to the proposed way of using type arguments, as call expressions may look the same, despite having different meanings depending on whether their arguments are types or values.

While it seems to be consensus in the community that using different brackets for type parameters and arguments by now, the following points have not been mentioned yet and further support the change.

Drawbacks when reading code

Assume we have a generic function that doubles an addable type:

@PCreations
PCreations / rxjs-diagrams.md
Last active September 26, 2024 01:44
Super Intuitive Interactive Diagrams to learn combining RxJS sequences by Max NgWizard K
@lattner
lattner / TaskConcurrencyManifesto.md
Last active November 15, 2024 05:45
Swift Concurrency Manifesto