Skip to content

Instantly share code, notes, and snippets.

View lukeacl's full-sized avatar

lukeacl lukeacl

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 = ''
@tuppaware
tuppaware / prideColors.swift
Created June 30, 2018 02:41
Add Pride colours to any UIView with this Swift extension
extension UIView {
func prideColors(){
// Offical colors
let colors = [UIColor(red:0.91, green:0.00, blue:0.00, alpha:1.0),UIColor(red:1.00, green:0.55, blue:0.00, alpha:1.0), UIColor(red:1.00, green:0.94, blue:0.00, alpha:1.0),UIColor(red:0.00, green:0.51, blue:0.12, alpha:1.0),UIColor(red:0.00, green:0.27, blue:1.00, alpha:1.0),UIColor(red:0.46, green:0.00, blue:0.54, alpha:1.0)]
for (index,color) in colors.enumerated() {
let gradient = CAGradientLayer()
gradient.frame = CGRect(x: (Int(self.bounds.width)/6)*index, y: 0, width: Int(self.bounds.width), height: Int(self.bounds.height))
gradient.colors = [color.cgColor, color.cgColor]
self.layer.addSublayer(gradient)
}