Skip to content

Instantly share code, notes, and snippets.

View evd0kim's full-sized avatar

Ilya Evdokimov evd0kim

  • Citizen of the World
View GitHub Profile
################################################################################
1. Find number of addresses sending funds to an address
################################################################################
SELECT
COUNT(DISTINCT ARRAY_TO_STRING(inputs.addresses, '')) AS addresses
, MIN(block_timestamp) as start_date
FROM `bigquery-public-data.crypto_bitcoin.transactions` AS txns
, UNNEST(txns.outputs) AS outputs
, UNNEST(txns.inputs) AS inputs
@caffeinum
caffeinum / simple-send.js
Last active September 25, 2020 12:25
Pure-JS OmniLayer sendtx
const bitcoin = require('bitcoinjs-lib') // version @3.3.2, ver4 won't work
const request = require('request-promise-native')
const net = process.env.NETWORK === 'testnet'
? bitcoin.networks.testnet
: bitcoin.networks.bitcoin
const API = net === bitcoin.networks.testnet
? `https://test-insight.swap.online/insight-api`
: `https://insight.bitpay.com/api`
@bretton
bretton / improved-lnd-bitcoind-mainnet.md
Last active May 13, 2024 14:23
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
@mkozjak
mkozjak / golang_on_rpi.md
Created February 4, 2018 08:41 — forked from simoncos/golang_on_rpi.md
Install Golang 1.9 on Raspberry Pi

Install Golang 1.9:

wget https://storage.googleapis.com/golang/go1.9.linux-armv6l.tar.gz
sudo tar -C /usr/local -xzf go1.9.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin # put into ~/.profile

If already installed old golang with apt-get:

@Necklaces
Necklaces / ufw_vpn_killswitch_tutorial.md
Last active February 28, 2024 22:13
GNU/Linux UFW VPN kill switch tutorial

GNU/Linux UFW VPN kill switch tutorial

This is a quick guide for setting up a kill switch using UFW (Uncomplicated FireWall). It is assumed you are using OpenVPN and optionally Network-Manager with network-manager-openvpn.

1. (Optional) IP Addresses

Before we can start we're going to need the IP address (or the IP addresses) of your VPN so that we can whitelist those later on, write them down. They are obviously going to be different for every VPN and VPNs with multiple servers, so I'll leave this up to you.

2. Install UFW

On some systems UFW is installed and enabled by default (Ubuntu, for example). Installation procedure is going to be different for every distribution of GNU/Linux, but it's usually something like

A description of known problems in Satoshi Nakamoto's paper, "Bitcoin: A Peer-to-Peer Electronic Cash System", as well as notes on terminology changes and how Bitcoin's implementation differs from that described in the paper.

Abstract

The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power.

@atx
atx / build-orangepipc-gentoo.py
Last active November 17, 2023 19:41
Script for building a Gentoo image for the Allwinner H3, use at your own risk
#! /bin/bash
# This script builds a Gentoo image for the Allwinner H3
# Based on http://linux-sunxi.org/H3_Manual_build_howto
# Tested on Orange Pi PC
set -e
function green {
echo -e '\033[0;32m'$@'\033[0m'
@david415
david415 / gist:8274636
Last active August 31, 2021 09:04
/etc/ufw/before.rules - for use with tor...
#
# rules.before
#
# Rules that should be run before the ufw command line added rules. Custom
# rules should be added to one of these chains:
# ufw-before-input
# ufw-before-output
# ufw-before-forward
#