Skip to content

Instantly share code, notes, and snippets.

@aidos-dev
aidos-dev / README.md
Last active November 4, 2024 20:55
How to connect Apple AirPods to Linux (Debian/Ubuntu/Mint)

How to connect Apple AirPods to Linux (Debian/Ubuntu/Mint)

Step 1.

Open your terminal.

In the root directory run the command:

sudo nano /etc/bluetooth/main.conf
@0xBEEFCAF3
0xBEEFCAF3 / README.md
Last active June 4, 2023 02:07
Ledger 2.1.0 Psbtv2 Conversion

LedgerHQ has laid the foundation for a PSBTv2 library, but it currently lacks some features and has issues with de/serialization. A complete Psbtv2 class can be found in my fork.

It is suggested to use PSBTv0 for all operations and only convert to v2 when communicating with the Ledger device. This can be achieved through utilizing BitcoinJS's excellent PSBTv0 library and utilizing an adapter function from v0 -> v2.

For exmaple if your're working with p2sh(p2wsh) script types, you might have something like:

export function convertPsbtv0ToV2(psbtv0: Psbt): PsbtV2 {
  const psbtv2 = new PsbtV2()
@hebasto
hebasto / guix-sigs.md
Last active March 28, 2024 10:11
The `bitcoin-core/guix.sigs` Repository Workflow

The bitcoin-core/guix.sigs Repository Workflow

Common environment variables

export SIGNER="hebasto"
export GUIX_SIGS_REPO="/home/hebasto/guix.sigs"
export DETACHED_SIGS_REPO="/home/hebasto/bitcoin-detached-sigs"
@njgibbon
njgibbon / minimal_zshrc_0.sh
Last active January 12, 2021 17:11
Minimal .zshrc to output git branch name in prompt.
# ~/.zshrc
# Find and set branch name var if in git repository.
function git_branch_name()
{
branch=$(git symbolic-ref HEAD 2> /dev/null | awk 'BEGIN{FS="/"} {print $NF}')
if [[ $branch == "" ]];
then
:
else
@stevecondylios
stevecondylios / resize-image-in-github-issue-github-flavored-markdown.md
Last active November 4, 2024 13:09
How to Resize an Image in a Github Issue (e.g. Github flavored Markdown)

How to Resize an Image in Github README.md (i.e. Github Flavored Markdown)

Percentage:

<img src="https://user-images.githubusercontent.com/16319829/81180309-2b51f000-8fee-11ea-8a78-ddfe8c3412a7.png" width=50% height=50%>

Pixels:

<img src="https://user-images.githubusercontent.com/16319829/81180309-2b51f000-8fee-11ea-8a78-ddfe8c3412a7.png" width="150" height="280">

@reinvanoyen
reinvanoyen / terminal-prompt-git-branch-zsh.md
Last active October 28, 2024 14:44
Add Git Branch Name to Terminal Prompt (MacOS zsh)

Add Git Branch Name to Terminal Prompt (zsh)

Updated for MacOS with zsh

  • Catalina
  • Big Sur
  • Monterey
  • Ventura
  • Sonoma

screenshot

@alexbosworth
alexbosworth / inotify-channel-backup.md
Last active March 29, 2024 01:33
Backup channel.backup file using systemd and inotify

LND backup script for channel.backup using inotify

Install inotify

sudo apt install inotify-tools

Create script to watch for changes and copy on change

@bretton
bretton / inbound-liquidity-ln.md
Last active April 5, 2024 17:38
How to get Inbound Liquidity on the Lightning Network

How to get Inbound Liquidity on the Lightning Network

There are several ways you can find inbound liquidity on LN.

1. Wait

If your node is up 24x7 and you have some outgoing channels, the network will connect to you if you simply wait.

However, it might take a couple of weeks to get a significant amount of incoming liquidity, and ideally you want your outgoing liquidity to match too.

@bretton
bretton / contribute-lightning-dev.md
Last active October 9, 2018 20:58
Become a contributor to the Lightning Dev Site
@gubatron
gubatron / hack_n_debug_bitcoin_with_gdb_or_LLDB.md
Last active January 18, 2023 16:21
How to build bitcoin and debug with GDB or LLDB

Hack and Debug with gdb or LLDB, using Bitcoin's code as an example

/*
 * Copyright CC0 Angel Leon <@gubatron>
 */

Update: I believe now it's better to use lldb, at least on MacOS, here's a LLDB to GDB command map

Here's how to use gdb to debug issues you might be having hacking bitcoinclassic (or any other C++ program)