Skip to content

Instantly share code, notes, and snippets.

View rbishop's full-sized avatar

Richard Bishop rbishop

View GitHub Profile

Various search databases and backends as alternatives to Elasticsearch.

Rust

@dchest
dchest / buzhash.ts
Created June 20, 2017 17:59
Buzhash with secret key
import { wipe } from "@stablelib/wipe";
/**
* Buzhash implements cyclic polymomial rolling hash function.
* It is a custom developed keyed variant with protections against plain text
* recovery from chunk lengths.
*
* Reading:
*
* http://www.serve.net/buz/Notes.1st.year/HTML/C6/rand.012.html
@joepie91
joepie91 / blockchain.md
Last active June 25, 2023 08:40
Is my blockchain a blockchain?

Your blockchain must have all of the following properties:

  • It's a merkle tree, or a construct with equivalent properties.
  • There is no single point of trust or authority; nodes are operated by different parties.
  • Multiple 'forks' of the blockchain may exist - that is, nodes may disagree on what the full sequence of blocks looks like.
  • In the case of such a fork, there must exist a deterministic consensus algorithm of some sort to decide what the "real" blockchain looks like (ie. which fork is "correct").
  • The consensus algorithm must be executable with only the information contained in the blockchain (or its forks), and no external input (eg. no decisionmaking from a centralized 'trust node').

If your blockchain is missing any of the above properties, it is not a blockchain, it is just a ledger.

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@kaave
kaave / Vagrantfile
Created April 22, 2016 22:38
Vagrant rsync setting for Phoenix Framework
Vagrant.configure(2) do |config|
config.vm.synced_folder './sync',
'/var/sync',
type: 'rsync',
# 標準の設定から[--delete]のみ除外
rsync__args: ['--verbose', '--archive', '-z', '--copy-links'],
rsync__exclude: ['.DS_Store', '.git/', 'deps/', '_build/', 'node_modules/']
end
@tlockney
tlockney / questions.md
Last active November 24, 2015 08:10
What questions would you put on a phone screen for a distributed systems position?

What questions would you put on a phone screen for a distributed systems position?

These come from @tsantero with the last two additions being curteousy of @ifesdjeen in reply to this question from @SeanTAllen.

  1. explain the life of an http request.
  2. what does the FLP result teach us?
  3. what is a byzantine failure?
  4. explain CRDTs
  5. explain linearizability.
  6. how does DNS work?
@ohanhi
ohanhi / frp.md
Last active May 6, 2024 05:17
Learning FP the hard way: Experiences on the Elm language

Learning FP the hard way: Experiences on the Elm language

by Ossi Hanhinen, @ohanhi

with the support of Futurice 💚.

Licensed under CC BY 4.0.

Editorial note

@tectonic's notes for Kerri Miller's (@kerrizor) RailsConf 2015 talk -- http://railsconf.com/program#prop_980
Interview Day
- Set and communicate a schedule (“two-three hours, no laptop needed, we will get lunch, no need to dress up”)
- Set expectations (“we will be writing some code together”)
- Have a diverse set of interviewers
- Allow for breaks
Make a game plan
- assign areas of focus (you do SQL, I’ll do OO)
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@sheerun
sheerun / certgen.rb
Last active April 10, 2022 15:39
Docker TLS certificate generator
# Generates necessary certificates to ~/.docker
#
# Usage:
# bundle install
# ruby certgen.rb <domain>
require 'certificate_authority'
require 'fileutils'
if ARGV.empty?