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
@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 = ''
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
@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'
* 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
@mary-ext
mary-ext / bluesky.txt
Last active July 15, 2025 01:42
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