Skip to content

Instantly share code, notes, and snippets.

@vrypan
vrypan / Farcaster Ordering (miners).md
Last active October 4, 2024 06:31
Farcaster Ordering (miners)

This is a proposal that introduces ordering to the Farcaster protocol. (See farcasterxyz/protocol#193)

The main advantage of this proposal is that it does not require any coordination (for example no need to appoint special roles or powers to a specific serializer).

High level architecture

There is a mempool where every hub submits deltas. Miners propose new blocks, each block is linked to the previous one in a blockchain. Anyone can spin up a miner.

Miners have to stake (lock) an amount of ETH but this amount is not fixed and may go up automatically if many miners compete in block creation. The stake is not slashed or lost in any way, but it will remain locked for 100 days, before the miner can withdraw it.

@vrypan
vrypan / fc-frame-domain-association-proposal.md
Last active March 12, 2024 04:28
Proposal: Farcaster Frame-Domain association

Proposal: Farcaster Frame-Domain association

Goals

  1. Create an association between a Frame domain or URL and an fid that can be lazily verified.
  2. Minimize number of tools and network requests required to verify a domain association.
  3. Allow for future extensions to domain verification.

Proposal (no protocol change)

The idea is to provide a way for an FID to publicly declare that they trust a URL. The simplest way to achieve this is

@vrypan
vrypan / Frames_proposal_get_action.md
Last active February 16, 2024 07:41
Proposal to add get actions to Frames (v3)

Goals

  • Enable the creation of frames that are statically hosted (accessible using HTTP GET vs HTTP POST).
  • Keep it as simple as possible.

Proposal

Add a new fc:frame:button:$idx:action type, get. Modify the use of fc:frame:button:$idx:target prop.

Verifying my Blockstack ID is secured with the address 1H3ZnXreqdBvRwJmNbFMm3rQqLH5ZZujPR https://explorer.blockstack.org/address/1H3ZnXreqdBvRwJmNbFMm3rQqLH5ZZujPR
@vrypan
vrypan / gist:198a189840f459384f8b07fe685d0d66
Created April 1, 2016 09:47 — forked from arvearve/gist:4158578
Mathematics: What do grad students in math do all day?

Mathematics: What do grad students in math do all day?

by Yasha Berchenko-Kogan

A lot of math grad school is reading books and papers and trying to understand what's going on. The difficulty is that reading math is not like reading a mystery thriller, and it's not even like reading a history book or a New York Times article.

The main issue is that, by the time you get to the frontiers of math, the words to describe the concepts don't really exist yet. Communicating these ideas is a bit like trying to explain a vacuum cleaner to someone who has never seen one, except you're only allowed to use words that are four letters long or shorter.

What can you say?

@vrypan
vrypan / gist:a77e00a37a6e6ca41058
Last active August 29, 2015 14:21
Modify /etc/logrotate.d/rsyslog to archive log files to BigStash
# Read more at http://blog.bigstash.co/2015/05/25/log-archiving-using-logrotate-and-bigstash/
/var/log/syslog
{
rotate 7
daily
missingok
notifempty
delaycompress
compress
postrotate
@vrypan
vrypan / country_codes.py
Created May 12, 2015 14:37
Country Codes accepted by Braintreepayments.com as a python tuple.
# -*- coding: utf-8 -*-
# Country codes accepted by Braintreepayments.com
# https://developers.braintreepayments.com/javascript+python/reference/general/countries
countries = (
('Afghanistan','AF','AFG','4'),
('Åland','AX','ALA','248'),
('Albania','AL','ALB','8'),
('Algeria','DZ','DZA','12'),
@vrypan
vrypan / improve_twitter_archive.py
Last active December 24, 2015 16:47
improve twitter exported archive
#! /usr/bin/env python
"""
This script will parse an unzipped Twitter archive export,
look for media links and download them localy, and replace
the links in the export to point to the local media copies.
It will also do the same for user avatars.
For more info visit: https://blog.vrypan.net/2015/12/24/how-to-archive-your-tweets/
"""
@vrypan
vrypan / gist:9399295
Last active August 29, 2015 13:57
keybase.md
### Keybase proof
I hereby claim:
* I am vrypan on github.
* I am vrypan (https://keybase.io/vrypan) on keybase.
* I have a public key whose fingerprint is 991C D46D A6C0 12FB D66E C2DC 5C73 8CBD 21BE DA13
To claim this, I am signing this object:
@vrypan
vrypan / dayone-to-b3.py
Last active December 24, 2015 06:29
Quick'n'dirty script to generate bucket3 posts from DayOne journal entries. Only entries with tag 'blog' will be published, the rest are ignored.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Usage:
dayone-to-b3.py [options]
Options:
-p, --path=<path> top directory of your blog. [default: .]
"""