Skip to content

Instantly share code, notes, and snippets.

View meeDamian's full-sized avatar
👨‍💻
Lightning Networking

Damian Mee meeDamian

👨‍💻
Lightning Networking
View GitHub Profile
@laurent22
laurent22 / javascript_warnings.md
Last active August 7, 2022 09:27
How many warnings should your JavaScript app have?

How many warnings should your JavaScript app have?

JavaScript warnings are these messages being displayed in yellow or red in your JavaScript console or terminal. They make no sense at all in general but they are a good indication of the health of your app. The points below will give you a general idea of how many warnings you should expect in your app:

  • 0 warnings: the app is not working at all

  • 5 warnings: app is probably starting but crashing soon after - try to find why it crashes. You'd think you could read the warnings to learn why it doesn't work, but that's not what warnings are for.

  • 50 warnings: That's the soft spot - most likely everything's running smoothly

@dvf
dvf / change-codec.md
Last active May 7, 2024 12:42
Enable High Quality mode on your headphones (Updated for macOS Catalina)

If you're using a high-end bluetooth headset on your Macbook Pro it's likely your mac is using an audio codec which favors battery efficiency over high quality. This results in a drastic degradation of sound, the SBC codec is the likely culprit, read more about it here.

Find out what codec you're using

  1. Play a song on your headphones
  2. Option (⌥) click the Bluetooth button at the top of your screen Inspect the Bluetooth Coded
  3. If you're using AAC or aptX, you can stop here—those are the highest quality codecs.

Change your codec to AAC or aptX

@billpatrianakos
billpatrianakos / lirc_pi_zero_w.txt
Last active December 16, 2023 19:20 — forked from prasanthj/lirc-pi3.txt
Getting lirc to work with Raspberry Pi Zero W (Raspbian Buster)
# Steps to get IR receiver and transmitter from Amazon [1] working on a Raspberry Pi Zero W.
$ sudo apt-get update
$ sudo apt-get install lirc
# Remove this line from /boot/config.txt
dtoverlay=lirc-rpi,gpio_in_pin=18,gpio_out_pin=17
# Add the following lines in /boot/config.txt
dtoverlay=gpio-ir,gpio_pin=23
@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

@brandoncurtis
brandoncurtis / neutrino-sync-20190319.md
Created March 20, 2019 01:29
Syncing Neutrino With Pre-#1319 and Post-#1319 BTCD

Setup

We have two BTCD nodes:

  • testnet1-btcd.zaphq.io, running BTCD commit before the #1319 filter fix
  • btcd-testnet.ion.radar.tech, running BTCD commit after the #1319 filter fix

We're running the version of LND packaged with the v0.4.4 release of Lightning-App:

  • Version: 0.5.2-99-beta commit=queue/v1.0.1-17-g09059eacf06068aefe6e5b23a0276fdcd8021d86
@laanwj
laanwj / blocktoimg.py
Last active January 31, 2024 11:06
tools to write (block) data to png files and vice versa
#!/usr/bin/env python3
# Distributed under the MIT software license
import binascii, struct, sys, io, argparse
from PIL import Image
IMG_WIDTH = 512 # could be made adaptive...
MIN_HEIGHT = 4 # minimum height of image; twitter won't let us upload anything smaller
BYTES_PER_PIXEL = 4 # RGBA, 8 bit
def div_roundup(x,y):
@levelsio
levelsio / btc-eth-dca-buy.php
Last active January 6, 2023 22:04
This script runs daily and "Dollar Cost Average"-buys $40 BTC and $10 ETH per day
<?
//
// [ BUY BTC & ETH DAILY ON BITSTAMP ]
// by @levelsio
//
// 2017-08-23
//
// 1) buy $40/day BTC
// 2) buy $10/day ETH
//
@julianxhokaxhiu
julianxhokaxhiu / build.sh
Last active February 19, 2024 22:04
How to build minimal ARM QEMU Static from sources with EXECVE
#!/bin/bash
#
# IMPORTANT!
# At the moment this script is forged only for Debian ( tested on 8.x release ).
# Although my efforts were put on building this also on Arch Linux or Alpine, at the moment only Debian seems to be able to build it.
# Also, not sure why these instructions where nowhere on the internet, therefore I leave them here for whoever need them.
#
###########
# Add Backports repo support
@muendelezaji
muendelezaji / bash-to-zsh-hist.py
Created October 5, 2016 14:18 — forked from op/bash-history-to-zsh-history.py
Convert Bash history to Zsh history
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This is how I used it:
# $ cat ~/.bash_history | python bash-to-zsh-hist.py >> ~/.zsh_history
import sys
import time
@troyk
troyk / jwt.go
Created April 7, 2016 04:21
golang jwt example
package cmd
import (
"encoding/json"
"flag"
"fmt"
"os"
"regexp"
"strings"