Skip to content

Instantly share code, notes, and snippets.

View GlenCooper's full-sized avatar
🧡
Hodling BTC

Glen Cooper GlenCooper

🧡
Hodling BTC
View GitHub Profile
@zachflower
zachflower / tor_curl.php
Last active March 15, 2024 15:02
How To Anonymize PHP cURL Requests Using Tor
<?php
$ip = '127.0.0.1';
$port = '9051';
$auth = 'PASSWORD';
$command = 'signal NEWNYM';
$fp = fsockopen($ip,$port,$error_number,$err_string,10);
if(!$fp) { echo "ERROR: $error_number : $err_string";
return false;
@rjmacarthy
rjmacarthy / bitcoind-ubuntu-install
Last active July 22, 2024 03:10
Install Bitcoind Ubuntu
** Add repository and install bitcoind **
sudo apt-get install build-essential
sudo apt-get install libtool autotools-dev autoconf
sudo apt-get install libssl-dev
sudo apt-get install libboost-all-dev
sudo add-apt-repository ppa:luke-jr/bitcoincore
sudo apt-get update
sudo apt-get install bitcoind
mkdir ~/.bitcoin/ && cd ~/.bitcoin/
@simivar
simivar / print_r_reverse.php
Last active November 4, 2023 23:27
PHP function to reverse print_r function
<?php
/**
* I've published a fully-tested Composer library with type-casting.
* @see https://github.com/simivar/reverse-print-r
*/
/**
* Matt: core
* Trixor: object handling
* lech: Windows suppport
@bretton
bretton / improved-lnd-bitcoind-mainnet.md
Last active June 26, 2024 16:08
Detailed guide to installing LND and Bitcoind on Ubuntu 16.04 LTS for Mainnet

Intro

This guide is specific to getting LND 0.5-beta and Bitcoind running on Ubuntu 16.04 LTS for mainnet. It is aging rapidly and includes steps not necessary on newer versions of LND. As of April 2021 it is very out of date for bitcoind. As of December 2021 it is outdated for LND too.

Original installation guide:

This guide is broken into the following sections:

  • Install bitcoind and set to start automatically
  • Install development tools and dependancies
@atefBB
atefBB / tor_curl.php
Last active February 26, 2024 01:58 — forked from zachflower/tor_curl.php
How To Anonymize PHP cURL Requests Using Tor
<?php
$ip = '127.0.0.1';
$port = '9051';
$auth = 'PASSWORD';
$command = 'signal NEWNYM';
$fp = fsockopen($ip,$port,$error_number,$err_string,10);
if(!$fp) {
echo "ERROR: $error_number : $err_string";
@fiatjaf
fiatjaf / .gitignore
Last active August 13, 2022 07:35
hsm_secret and custom invoices with lnurl on c-lightning
venv
*.swo
*.swp
__pycache__
@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

@jeffrade
jeffrade / bitcoind-start.sh
Last active April 13, 2024 21:08
bitcoind systemd service and start script.
#!/bin/bash
# Just a simple wrapper to start bitcoind.
#
# If using systemd, simply create a file (e.g. /etc/systemd/system/bitcoind.service)
# from example file below and add this script in ExecStart.
# https://raw.githubusercontent.com-/bitcoin/bitcoin/76deb30550b2492f9c8d9f0302da32025166e0c5/contrib/init/bitcoind.service
#
# Then run following to always start:
# systemctl enable bitcoind
@Belial-public
Belial-public / BitcoinVersioning.md
Created February 7, 2020 06:39 — forked from gavinandresen/BitcoinVersioning.md
Suggestions on more smoothly rolling out blockchain validation rule changes

Blockchain Rule Update Process

We recently rolled out two changes to the Bitcoin block acceptance rules (BIP16 and BIP30); this document records the lessons learned and makes recommendations for handling future blockchain rule changes.

Note: there are "soft" rule changes and "hard" rule changes. "Soft" changes tighten up the rules-- old software will accept all the blocks and transactions created by new software, but the opposite may not be true. "Soft" changes do not require the entire network of miners and merchants and users to upgrade or be left behind.

"Hard" changes modify the rules in a way that old, un-upgraded software consider illegal. At this point it is much, much more difficult (some might say impossible) to roll out "hard" changes, because they require every miner and merchant and user to upgrade.

Lessons Learned

-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFw8N4EBEADDv38WWb4+IDku5NxpDGyhX9Of0/KfSCATdNVnjsa8yriNBB5B
V3U3Nu+zZQF/Yd54h2GfO+JgeMP2XIqJ26+OaWvhVCpJ6oZbHPCl1FutebSFOc+x
I2d3Ki1BYoiLtWCkdfyKQUH3+7JTV2uCQZQZ+of6l35i71sj5T59HolpmUp8ZYx/
ztNQOxJH02GEvyoK8yUDu0gPGECJ/UtCdysy+V36h/Np5XNIKdd62hh/YAeopvCg
Mf+0dr6Es72sBXWMTzyOLE/L8KJUaIjupq4TkD1sbtLHW+7ocuJ+JUZ/12ouNrNf
lVuEA8z9udkm5p0GMv+Gu24YBLCNESjIHPd2uRrNnAz5qUG8lWK1rXDqFOMimhKS
rtdoPEmIxZxLj2TN64cFCk2e7HNJRjFOTxoDgPyrdW/CRBiCWcTQ8e92ukrLVep0
6m+/U2p+HIDwZyy63t6U2m01GoF97qEaRpXOM6vUSlund3i5M6DdAAyd/AaiP3Nt