Skip to content

Instantly share code, notes, and snippets.

@eruvanos
eruvanos / README.md
Last active May 9, 2024 08:12
Simple mock server for testing using Flask

Mock server for testing using flask

License

MIT

Prepare

Install flask and requests to run this example.

@zquestz
zquestz / KubernetesBitcoinConfigs.md
Last active May 20, 2022 02:42
GCE Kubernetes Bitcoin Configs

Bitcoin Kubernetes Configs

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

@sashazykov
sashazykov / gist:29b87b6b86e9ed3d75df
Last active August 29, 2015 14:03
Bash completion for ssh. Tested with Mac OS X 10.9
# 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=()
@vinceallenvince
vinceallenvince / README.md
Last active April 13, 2019 05:24
CI with Travis, github Releases API, gh-pages and npm publish

CI with Travis, GitHub Releases API and gh-pages

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.

Organize your project

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.

@gcmurphy
gcmurphy / github_pom.rb
Created June 3, 2013 11:31
Search github for pom.xml files and extract the dependencies.
#!/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
@smougenot
smougenot / A_Logstash.conf
Created July 26, 2012 13:59
Logstash Multiline Filter for Java Stacktrace (tested on field)
# 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"
}
@btoone
btoone / curl.md
Last active May 14, 2024 19:32
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@mbostock
mbostock / .block
Last active December 4, 2021 22:40
Brush & Zoom Redirect [UNLISTED]
redirect: 34f08d5e11952a80609169b7917d4172
@igrigorik
igrigorik / vimgolf.vimrc
Last active September 4, 2022 10:35
Basic vimrc to level the playing field...
" 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