Skip to content

Instantly share code, notes, and snippets.

# Raw transaction API example work-through
# Send coins to a 2-of-3 multisig, then spend them.
#
# For this example, I'm using these three keypairs (public/private)
# 0491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f86 / 5JaTXbAUmfPYZFRwrYaALK48fN6sFJp4rHqq2QSXs8ucfpE4yQU
# 04865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a986818a7cb624532f062c1d1f8722084861c5c3291ccffef4ec6874 / 5Jb7fCeh1Wtm4yBBg3q3XbT6B525i17kVhy3vMC9AqfR6FH2qGk
# 048d2455d2403e08708fc1f556002f1b6cd83f992d085097f9974ab08a28838f07896fbab08f39495e15fa6fad6edbfb1e754e35fa1c7844c41f322a1863d46213 / 5JFjmGo5Fww9p8gvx48qBYDJNAzR9pmH5S389axMtDyPT8ddqmw
# First: combine the three keys into a multisig address:
./bitcoind createmultisig 2 '["0491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f86","04865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a9
@gavinandresen
gavinandresen / BlockPropagation.md
Last active March 14, 2023 09:45
O(1) block propagation

O(1) Block Propagation

The problem

Bitcoin miners want their newly-found blocks to propagate across the network as quickly as possible, because every millisecond of delay increases the chances that another block, found at about the same time, wins the "block race."

@lokhman
lokhman / ubuntu-hardening.md
Last active April 23, 2024 09:05
List of things for hardening Ubuntu

WARNING

May contain out of date information. Check the comments below!

The list of actions listed below was taken mostly from Book Of Zeus with minor modifications and did the job well for Ubuntu version, which was available at that moment (May 2016). This gist was created for internal use and was never meant to be discovered by the web, although Google managed to find and index this page, which was a great surprise for me. Please check the original source for the updated information (links are provided in most of the sections), and read the comments below: they provide more details about the usage experience.

System Updates

http://bookofzeus.com/harden-ubuntu/initial-setup/system-updates/

Keeping the system updated is vital before starting anything on your system. This will prevent people to use known vulnerabilities to enter in your system.

@kangtastic
kangtastic / att6rd.sh
Last active November 1, 2020 20:28
AT&T 6rd script for Linux routers
#!/bin/bash
# Create a 6rd tunnel on a Linux router using AT&T U-Verse Fiber/DSL.
#
# Only creates a tunnel and sets up a default route. IPv6 connectivity for LAN
# clients requires, at minimum, sending Router Advertisements (with radvd/
# dnsmasq) to the LAN interface and enabling IPv6 forwarding in the kernel.
# IPv6 firewalling with ip6tables is also a very good idea.
#
# Hat tip VictorLowther: https://gist.github.com/VictorLowther/2969270
#
@jrgutier
jrgutier / eap_proxy_edgeos_ipv6.sh
Created March 17, 2018 00:48
Get ipv6 working with the default eap_proxy interfaces on EdgeOS
#!/bin/sh
PREAMBLE="\x19\x00\x00\x02\x00\x00\x0d\xe9\x30\x30\x44\x30\x39\x45\x2d" # For Pace 5268AC
SERIAL=00000A000000
WAN=eth0.0
LAN=eth1
to_shellcode()
{
counter=0
@anthonytxie
anthonytxie / hodl20.py
Created March 24, 2018 21:01
Hodl 20 Rebalancing Algorithm
def calc_allocations(self, date, quantity, cap):
"""Figure out ideal allocations for a given date"""
# {
# coin_name: (percent_allocation, data)
# }
top_market = self.get_top_market(date, quantity)
total_cap = sum([coin.market_cap for coin in top_market])
allocations = [{
@Diversified1
Diversified1 / Playground.hs
Last active September 18, 2020 22:02
Plutus Playground Smart Contract
-- | Crowdfunding contract implemented using the [[Plutus]] interface.
-- This is the fully parallel version that collects all contributions
-- in a single transaction.
--
-- Note [Transactions in the crowdfunding campaign] explains the structure of
-- this contract on the blockchain.
import qualified Language.PlutusTx as PlutusTx
import qualified Ledger.Interval as Interval
import Ledger.Slot (SlotRange)
import qualified Ledger.Slot as Slot
@fjiang423
fjiang423 / bypass_att_fiber_modem_ubiquiti_usg.md
Last active March 28, 2021 02:33
Bypassing AT&T Gigabit Fiber Modem for USG (& Pro)
### Keybase proof
I hereby claim:
* I am diversified1 on github.
* I am billy10 (https://keybase.io/billy10) on keybase.
* I have a public key ASC1ML7wUvG6SbQtAxU8HSR060qsngDFK7MhtlvjIsokKwo
To claim this, I am signing this object:
@physhster
physhster / USG WPA Supplicant Config for AT&T Fiber
Last active April 15, 2024 23:21
Complete-ish guide to WPA Supplicant bypass on AT&T U-verse Fiber with Unifi USG
*Important note to pay attention to*
You'll most likely use eth0 on a USG and eth2 or eth3 on a USG-Pro, edit the files accordingly. Do not run the supplicant on virtual interfaces (e.g. eth0.0), as it will not work.
*Pre-requisites*
Get certs, run the mfg_dat_decode tool. You should end up with 3 certs: CA_*.pem, Client_*.pem and PrivateKey_PKCS1_*.pem, as well as a a wpa_supplicant.conf file
In the archive generated by the tool, edit wpa_supplicant.conf to add the full path /config/auth/ to all 3 files:
network={
ca_cert="/config/auth/CA_xxxxxx.pem"