Skip to content

Instantly share code, notes, and snippets.

View barryf's full-sized avatar

Barry Frost barryf

View GitHub Profile
@barryf
barryf / northHertsWaste.js
Created December 10, 2023 14:38
Val to scrape North Herts Waste website for upcoming bin days and return an ICS
// Make request to this URL with ?id={your house ID}
// Returns ICS
export const northHertsWaste = async (req) => {
const cheerio = await import("npm:cheerio");
const ics = await import("npm:ics");
const searchParams = new URL(req.url).searchParams;
const id = searchParams.get("id");
const url = `https://north-herts.whitespacews.com/north/Address/Details/${id}`;
@barryf
barryf / reeder-read-later-to-readwise.rb
Created March 31, 2023 15:02
Transfer Read Later JSON export from Reeder to Readwise Reader via its API. Batches posts because of API's 20 requests per minute rate limit.
# Transfer Read Later JSON export from Reeder to Readwise Reader via its API.
# Batches posts because of API's 20 requests per minute rate limit.
require 'json'
require 'httparty'
offset = 0
max = 20
token = ENV['token']
api_url = 'https://readwise.io/api/v3/save/'
@barryf
barryf / wm-receiver.md
Created May 14, 2021 14:49
Webmention receiver notes

Layout

  • http
    • post-webmention :source, :target
      • Return 400 if source and target are not valid URLs
      • Return 400 if source is the same as target
      • Return 400 if target is not a known domain
      • Return 400 if source’s domain is found in blocks table
      • Create random ID to represent webmention
      • Put id, source, target, created_at in webmentions table
  • Put id, webmention_id, created_at, description in statuses table
@barryf
barryf / multiple-micropub.json
Created May 6, 2016 08:47
Multiple Micropub updates in one request
{
"mp-action": "update",
"url": "http://example.com/post/1",
"replace": {
"content": ["hello moon"],
"name": ["about the moon"]
},
"add": {
"syndication": ["https://archive.org/"],
"category": ["micropub"]

Keybase proof

I hereby claim:

  • I am barryf on github.
  • I am barryf (https://keybase.io/barryf) on keybase.
  • I have a public key whose fingerprint is 800F 6580 CF4E 0482 1F34 4961 EBDF 53B1 84DD D4B7

To claim this, I am signing this object:

@barryf
barryf / product-manager.md
Last active August 29, 2015 14:02
Product Manager job specification

Product Manager

Department: Product
Manager:    CPO
Location:   London

Purpose:

Build and maintain the company’s online dating platforms and other strategic technologies. Adopting the Product Owner role in Scrum teams, plan, manage and deliver product projects, measuring and reporting on success to stakeholders. Working at the intersection of technology, user experience and the business you will be expected to deliver innovative and effective solutions for our customers.

@barryf
barryf / healthy_tartare.md
Created July 7, 2011 21:07
Healthy tartare sauce

Healthy tartare sauce

  • 4 tbsp crème fraiche
  • 1 tbsp capers
  • 1 tbsp dijon mustard
  • juice of half a lemon
  • a few sprigs of parsley, chopped

Combine in a bowl. Serve with fish.