Skip to content

Instantly share code, notes, and snippets.

View therealFoxster's full-sized avatar
⚠️
Uncaught TypeError: Cannot read property 'status' of undefined

huy therealFoxster

⚠️
Uncaught TypeError: Cannot read property 'status' of undefined
View GitHub Profile
@therealFoxster
therealFoxster / macos13_pmfix.sh
Created August 11, 2022 09:44
A fix for SendLaterDelivery causing high CPU usage (powerd) on macOS 13.0 beta. Tested on 13.0b5.
#!/bin/bash
while true; do
idle=10 #minutes
echo -n "${WBOL}[$(date +'%H:%M')]${WDEF} checking pm schedules; "
sched=$(pmset -g sched)
if [[ $sched != "" ]]; then
echo -n "found schedule(s); cancelling all; "
if pmset schedule cancelall; then
echo -n "cancelled all schedules; "
else
import Foundation
import UIKit
import Photos
class HBTools {
static let appName = Bundle.main.object(forInfoDictionaryKey: "CFBundleName") as? String ?? "String_appName"
enum Orientation {
case portrait
@therealFoxster
therealFoxster / AppleEsqueViewController.swift
Last active September 2, 2022 01:58
Create Apple-esque views with UIKit
import UIKit
import IQKeyboardManagerSwift
class AppleEsqueViewController: UIViewController, UIScrollViewDelegate {
// Strings & values
private var titleText: String = "Title Text",
primaryButtonText: String = "Continue",
secondaryButtonText: String = "Skip"