Skip to content

Instantly share code, notes, and snippets.

@RangerMauve
RangerMauve / hyperbee-indexed.md
Last active April 6, 2024 13:33
Hyperbee Indexed DB

Hyperbee Indexed DB

Purpose:

Hyperbee is super useful for storing data and searching for data using it's ordered key search. When you set up your keyspace just right, you can query a small subset of a large database and quickly load what you need without having to download the entire dataset or traverse it.

This module seeks to make it easier to set up these indexes for JSON data and to make it easy to query large datasets.

How it works

@dakk
dakk / tezos-baking-howto.md
Last active March 6, 2022 21:22
tezos-baking-howto.md

Tezos baking howto

This howto is valid for Betanet on Ubuntu or Debian

Setup

Prereq

You have to install some dependencies. In debian / ubuntu run:

@pfrazee
pfrazee / userland-webdb.js
Created November 27, 2017 19:17
Example usage of a hypothetical new version of Ingest, which is renamed to WebDB and tweaked a little
import WebDB from 'dat://modules.beakerbrowser.com/webdb.1.0.0.js'
// setup
// ==
// create the database instance
const webdb = new WebDB()
// define our data model

Can we create a smart contract VM on nodejs using Dat?

Ethereum is a trustless network of VMs which run smart contracts submitted by users. It uses proof-of-work to synchronize state across the network, and has every node execute the contracts in order to verify the state's validity. Each transaction is stored in the blockchain for replayability. Read more about it here.

Ethereum's "trustless network" model has some disadvantages:

  • Transaction processing is slow - it maxes at roughly 25tx/s right now for all contracts combined.
  • Every transaction costs money to execute.
  • The entire blockchain state must be shared across the computing network.
  • No private transactions.
@pfrazee
pfrazee / link-checker.js
Created September 17, 2016 20:02
Quick link-checker script for Jekyll sites
@drwasho
drwasho / P2P-lending-in-OpenBazaar.md
Last active December 13, 2017 17:47
A proposal for pseudonymous, peer-to-peer lending on OpenBazaar using Ricardian contracts and distributed collateralized trusts (dCT)

Peer-to-Peer Lending on OpenBazaar

0

Preamble

Banks are centralised institutions that, among other things, offer credit to individuals, groups and corporations. Historically, banks were a nexus of borrowers and lenders, matching the supply of liquidity to the demand for credit. The primary role of a bank was risk management in the form of the due diligence required to assess if a potential borrower was a worthwhile investment. With the advent of nation-state money printing and fractional-reserve banking, whereby money is lent into existence and losses are publicly subsidized by inflation and bailouts, the traditional care of risk management for loans has all but been obiliterated.

Peer-to-peer (P2P) lending has emerged as a means to decentralise the oligopolistic hold that banks possess in every category for lending. While P2P lending is still in early days, regulatory pressure is mounting making P2P lending

@mislav
mislav / pagination.md
Created October 12, 2010 17:20
"Pagination 101" by Faruk Ateş

Pagination 101

Article by Faruk Ateş, [originally on KuraFire.net][original] which is currently down

One of the most commonly overlooked and under-refined elements of a website is its pagination controls. In many cases, these are treated as an afterthought. I rarely come across a website that has decent pagination, and it always makes me wonder why so few manage to get it right. After all, I'd say that pagination is pretty easy to get right. Alas, that doesn't seem the case, so after encouragement from Chris Messina on Flickr I decided to write my Pagination 101, hopefully it'll give you some clues as to what makes good pagination.

Before going into analyzing good and bad pagination, I want to explain just what I consider to be pagination: Pagination is any kind of control system that lets the user browse through pages of search results, archives, or any other kind of continued content. Search results are the o