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 November 16, 2024 01:25
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