Skip to content

Instantly share code, notes, and snippets.

View DrBeta's full-sized avatar
💅
slaying my way through coding and music

John DrBeta

💅
slaying my way through coding and music
  • Myself
  • Earth
View GitHub Profile
@DrBeta
DrBeta / Dilbert.py
Last active May 31, 2020 03:59
Dilbert.py
import requests
import urllib.request
import time
from bs4 import BeautifulSoup
import io
import datetime
import urllib
from PIL import Image
def DilbertURL(dateToFetch):
@DrBeta
DrBeta / README.md
Last active December 17, 2019 00:47
Programmatic layout in iOS 13

You sometimes need to have a programmatic layout when making iOS apps. But, if you have been playing around with the Xcode beta, you might notice that your old code to do that doesn't work. This code is used in the func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) in SceneDelegate.swift to initialize the programmatic layout. There is also a Storyboard name in the Info.plist you have to delete. Happy coding!

@dannote
dannote / final-cut-pro-trial-reset.swift
Last active May 8, 2024 03:08
Final Cut Pro X trial reset
#!/usr/bin/swift
import Foundation
let path = URL(fileURLWithPath: NSString(string: "~/Library/Application Support/.ffuserdata").expandingTildeInPath)
let data = try! NSData(contentsOf: path) as Data
let dictionary = try! NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(data) as! NSDictionary
let mutableDictionary = dictionary.mutableCopy() as! NSMutableDictionary
for (key, value) in mutableDictionary {