Skip to content

Instantly share code, notes, and snippets.

View mackuba's full-sized avatar
🦋
Building things for Bluesky with ATProto

Kuba Suder mackuba

🦋
Building things for Bluesky with ATProto
View GitHub Profile
@mary-ext
mary-ext / bluesky-osa.md
Last active July 29, 2025 00:38
Bluesky's UK age assurance sucks, here's how to work around it.

Bluesky's UK age assurance sucks, here's how to work around it.

Bluesky recently announced that they're complying with the UK's Online Safety Act, which requires users to provide personal identity verification confirming their age (through Epic Games' Kids Web Services) before accessing certain parts of the platform.

This sucks for privacy reasons, but thankfully there are ways to work around it.

Workaround methods

Method 0. VPN

@mary-ext
mary-ext / bluesky.txt
Last active July 26, 2025 12:47
make bluesky good ublock filter
! remove `session_id` tracking parameter from videos
!
! ideally this would've been a redirect from `video.bsky.app/watch/<did>/<cid>/playlist.m3u8`
! to `video.cdn.bsky.app/hls/<did>/<cid>/playlist.m3u8`, as the latter is the actual CDN while
! the former is the middleware, however:
!
! - the raw playlist will not contain webvtt, that's added in by the middleware
! - ublock doesn't have a rule that allows redirecting to non-local neutered resource
!
||video.bsky.app$removeparam=session_id
* Migration
** Blank env
export INVITECODE=
export ACCOUNTDID=did:plc:XXX
export OLDPDSHOST=https://bsky.social
export OLDPDSSERVICEDID=did:web:bsky.social
export OLDHANDLE=
export OLDPASSWORD=""
export NEWPDSHOST=https://pds.merklehost.xyz
export NEWPDSSERVICEDID=did:web:pds.merklehost.xyz
@marckohlbrugge
marckohlbrugge / bluesky.rb
Last active June 4, 2025 17:34
work in progress implementation of `omniauth-bluesky`
require 'omniauth-oauth2'
require 'openssl'
require 'jwt'
require 'securerandom'
module OmniAuth
module Strategies
class Bluesky < OmniAuth::Strategies::OAuth2
option :name, 'bluesky'
sudo port install rbenv ruby-build
rbenv install 2.7.6
rbenv global 2.7.6
eval "$(rbenv init - bash)"
cd social-web
bundler install
nvm use # v18
corepack enable # this makes yarn available
yarn exec env # smoketest for yarn
@haileyok
haileyok / migrate.js
Last active October 20, 2024 19:29
Migrate PDS script
import AtpAgent from '@atproto/api'
import { Secp256k1Keypair } from '@atproto/crypto'
import * as ui8 from 'uint8arrays'
const OLD_PDS_URL = 'https://bsky.social'
const NEW_PDS_URL = 'https://pds.haileyok.com'
const CURRENT_HANDLE = 'haileyok.com'
const CURRENT_PASSWORD = ''
const NEW_HANDLE = 'newphone.pds.haileyok.com'
const NEW_ACCOUNT_EMAIL = ''
@nicklockwood
nicklockwood / OSKit.swift
Created January 28, 2023 11:32
A lightweight approach to writing cross-platform code in SwiftUI without a lot of conditional compilation blocks
import SwiftUI
enum OSDocumentError: Error {
case unknownFileFormat
}
#if canImport(UIKit)
import UIKit
//
// A Swift property wrapper for adding "indirect" to struct properties.
// Enum supports this out of the box, but for some reason struct doesn't.
//
// This is useful when you want to do something recursive with structs like:
//
// struct Node {
// var next: Node?
// }
//
@steipete
steipete / RandomColor.swift
Created April 6, 2021 17:20
Random Color for SwiftUI
extension Color {
/// Return a random color
static var random: Color {
return Color(
red: .random(in: 0...1),
green: .random(in: 0...1),
blue: .random(in: 0...1)
)
}
}
@williballenthin
williballenthin / macOS_savedstate.py
Last active January 25, 2025 05:05
parse macOS savedState files
'''
parse SavedState artifacts extracted from OSX.
author: Willi Ballenthin ([email protected])
license: Apache 2.0
'''
import re
import sys
import json
import struct