Skip to content

Instantly share code, notes, and snippets.

View rickw's full-sized avatar

Rick Windham rickw

View GitHub Profile
@iolloyd
iolloyd / demo.tpl
Last active January 8, 2020 17:56
dynamic inventory from terraform
[kube-master]
${k8s_master_name}
@haferman
haferman / celocli.txt
Created December 19, 2019 15:34
celo: celocli install for fresh Ubuntu 18.04 server
# install nodejs and dependencies
sudo apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates
curl -sL https://deb.nodesource.com/setup_10.x | sudo bash
sudo apt -y install gcc g++ make
sudo apt -y install nodejs
# install yarn
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
# check on node and npm versions (for me was 10.17.0 and 6.11.3)
$ sudo apt-get install wireguard
#if fail → via ppa
$ sudo add-apt-repository ppa:wireguard/wireguard
$ sudo apt-get update
$ sudo apt-get install wireguard
$ sudo systemctl stop wg-quick@wg0
$ sudo vi /etc/wireguard/wg0.conf
@mattt
mattt / bridge.swift
Last active June 14, 2023 11:47
Example usage of @mxcl's swift-sh
#!/usr/bin/swift sh
import DeckOfPlayingCards // @NSHipster ~> 4.0.0
import PlayingCard
import Cycle // @NSHipster == bb11e28
class Player {
var name: String
var hand: [PlayingCard] = []
@imran-baig-se
imran-baig-se / adding your filter
Created April 15, 2018 21:20
adding your filter for ELK path: dockers-elk/logstash/pipeline/logstash.conf
filter {
json {
source => "message"
}
mutate {
add_field => { "index_name" => "www-log" }
}
}
@carlosmcevilly
carlosmcevilly / hashit.sh
Last active September 11, 2019 15:55
hashit - wrapper around openssl providing easy command-line access to common hash functions
#!/bin/bash
# hashit - wrapper around openssl providing easy command-line access to common hash functions
#
# by Carlos McEvilly
#
# 'hashit' creates symlinks to itself, named after
# common hashing schemes, and then the script can
# be invoked via any so-named symlink with a text
# string or filename argument in order to obtain
@WietseWind
WietseWind / rippled-proxy.js
Created March 8, 2018 00:30
Rippled Websocket proxy to test reconnecting & health checking for https://www.npmjs.com/package/rippled-ws-client
const WebSocket = require('ws')
const ws = new WebSocket('wss://s1.ripple.com')
const wss = new WebSocket.Server({ port: 8011 })
wss.on('connection', function connection(c) {
let sendmessages = true
setTimeout(function () {
sendmessages = false
@xeoncross
xeoncross / channels.go
Created February 12, 2018 22:39
Fastest way to merge multiple channels in golang.
package main
import (
"fmt"
"sync"
"sync/atomic"
)
// Fill Channel with int values
func fillChan(number int) <-chan int {
@gavinandresen
gavinandresen / UTXO_BitVector.md
Last active December 14, 2023 23:28
Storing the UTXO as a bit-vector

Half-baked thoughts exploring a different way of implementing a fully-validating BCH node.

The idea is to shift the storage of full transaction data to wallets, and explore how little data a fully validating node could store. This isn't a problem today (the UTXO set easily fits in the RAM of an inexpensive server-class machine), but might eventually be at very large transaction volumes.

Initial block download is a problem today (it is annoying to have to wait several hours or days to sync up a new node), and this scheme could make it orders of magnitude faster by shifting the time when full transaction data is broadcast from initial block download to new transaction announcement.

@pirey
pirey / alacritty-colors.yaml
Created December 5, 2017 03:09
alacritty theme collection
# Colors (Nord)
# colors:
# # Default colors
# primary:
# background: '0x2E3440'
# foreground: '0xD8DEE9'
#
# # Normal colors
# normal:
# black: '0x3B4252'