This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script resolves a DID, retrieves an API key, fetches a user's feed, | |
# and posts a "Hello, world" message to the user's feed. | |
# Resolve DID for handle | |
HANDLE='felicitas.pojtinger.com' | |
DID_URL="https://bsky.social/xrpc/com.atproto.identity.resolveHandle" | |
export DID=$(curl -G \ | |
--data-urlencode "handle=$HANDLE" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env stack | |
-- stack --resolver lts-18.8 script | |
{-# LANGUAGE OverloadedStrings #-} | |
{- | |
This is a handy illustration of converting between five of the commonly-used | |
string types in Haskell (String, ByteString, lazy ByteString, Text and lazy | |
Text). |