Skip to content

Instantly share code, notes, and snippets.

@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.

@vrypan
vrypan / dyndns53.py
Last active August 12, 2021 21:43
Python script to add/update an A record at amazon area53 DNS service, using current IP. (ie, dyndns replacement)
from area53 import route53
from boto.route53.exception import DNSServerError
import requests
import sys
from datetime import datetime
# Modified from https://markcaudill.me/blog/2012/07/dynamic-route53-dns-updating-with-python/
domain = 'domain.tld'
subdomain = 'subdomain_name'
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 / 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 / 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: .]
"""
@vrypan
vrypan / gist:4136206
Created November 23, 2012 15:48
smart redirects from 404 pages.
<script>
$.getJSON('/_/js/url_mapper.json', function(data) {
path = location.pathname.split("/") ;
if ( path[1] == "post" ){
id = path[2];
if ( data[id] ) {
$('#msg_en').html("The page you are looking has probably moved to \<a href=\"" + data[id] + "\"\>" + data[id] + "\</a\>.") ;
}
}
});
@vrypan
vrypan / listener.py
Created February 16, 2012 13:17
simple pubsubhubbub listener for superfeedr
import re
import cherrypy
import sys
class Root(object):
@cherrypy.expose
def default(self, **kwargs):
print kwargs
return 'OK'
@vrypan
vrypan / automator.sh
Created February 16, 2012 13:31
use listener.py to trigger scripts when a feed is updated
python listener.py | while read tag feed ; do
echo ">>>" $feed "updated!"
if [[ "$feed" == "http://picks.vrypan.net/rss" ]]; then
... do something here, like reading the new feed items, and post them to a different service.
...
fi
echo "<<<"
done