Skip to content

Instantly share code, notes, and snippets.

All we are is an isle of flightless birds

John DrBeta

All we are is an isle of flightless birds
View GitHub Profile
DrBeta / wait.swift
Created Jan 26, 2019
This is a easy to use function that you can add to any swift code that waits for a time you specify in the "time" parameter.
View wait.swift
// Created by Dr.Beta
import Foundation
import UIKit
//Put the amount of seconds in the 'time' parameter.
func wait(time: UInt32) {
//This line waits for 4 seconds
wait(time: 4)
//Now do whatever you want, in this case I print "It has been 4 seconds".
DrBeta / main.dart
Last active May 15, 2019
Stream Example
View main.dart
import 'dart:async';
class Cake {}
class Order {
String type;
void main() {
DrBeta /
Last active Dec 17, 2019
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!

DrBeta /
Last active May 31, 2020
import requests
import urllib.request
import time
from bs4 import BeautifulSoup
import io
import datetime
import urllib
from PIL import Image
def DilbertURL(dateToFetch):