MIT
Install flask and requests to run this example.
The following guide will walk you through creating a bitcoin full node within GKE (Google Container Engine).
By default Bitcoin ABC is used, however this can be swapped for any other node quite easily.
If you wish to run another version of bitcoind, just change the image reference in bitcoin-deployment.yml
. There are tons of images available on the Docker Hub. Better yet, build your own. =)
The source for the included image is available at: https://github.com/zquestz/docker-bitcoin
# Add bash completion for ssh: it tries to complete the host to which you | |
# want to connect from the list of the ones contained in ~/.ssh/known_hosts | |
__ssh_known_hosts() { | |
if [[ -f ~/.ssh/known_hosts ]]; then | |
cut -d " " -f1 ~/.ssh/known_hosts | cut -d "," -f1 | grep -v "[\[\|]" | uniq | sort | |
fi | |
} | |
_ssh() { | |
local cur known_hosts | |
COMPREPLY=() |
When hosting a project on GitHub, it's likely you'll want to use GitHub Pages to host a public web site with examples, instructions, etc. If you're not using a continuous integration service like Travis, keeping your gh-pages site up to date requires continuous wrangling.
The steps below outline how to use Travis CI with GitHub Releases and GitHub Pages to create a "1-button" deployment workflow. After testing and running a release build, Travis will upload your release assets to GitHub. It will also push a new version of your public facing site to GitHub Pages.
Let's assume you are hosting a JavaScript project that will offer a single JavaScript file as a release asset. It's likely you'll organize your files like this.
#!/usr/bin/env ruby | |
require 'pp' | |
require 'uri' | |
require 'net/http' | |
require 'octokit' | |
require 'nokogiri' | |
require 'celluloid' | |
require 'mongo' | |
require 'logger' |
# 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 |
# stacktrace java as one message | |
multiline { | |
#type => "all" # no type means for all inputs | |
pattern => "(^.+Exception: .+)|(^\s+at .+)|(^\s+... \d+ more)|(^\s*Caused by:.+)" | |
what => "previous" | |
} | |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
redirect: 34f08d5e11952a80609169b7917d4172 |
" http://vimdoc.sourceforge.net/htmldoc/starting.html#vimrc | |
set nocompatible " use vim defaults | |
set scrolloff=3 " keep 3 lines when scrolling | |
set ai " set auto-indenting on for programming | |
set showcmd " display incomplete commands | |
set nobackup " do not keep a backup file | |
set number " show line numbers | |
set ruler " show the current row and column |