// | |
// AppDelegate.m | |
// | |
// | |
// Created by Cory D. Wiles on 10/8/12. | |
// Copyright (c) 2013 Cory D. Wiles. All rights reserved. | |
// | |
#import "AppDelegate.h" | |
#import "iTunes.h" |
Custom recipe to get macOS 10.12 Sierra running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.11 El Capitan setup recipe and 10.10 Yosemite setup recipe. I am currently tweaking this for 10.12 Sierra and expect to refine this gist over the next few weeks.
I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. I generally reinstall each computer from scratch every 6 months, and I do not perform upgrades between releases.
This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.
You are encouraged to fork this and modify it to your heart's content to match your o
/// This is a list of Hypertext Transfer Protocol (HTTP) response status codes. | |
/// It includes codes from IETF internet standards, other IETF RFCs, other specifications, and some additional commonly used codes. | |
/// The first digit of the status code specifies one of five classes of response; an HTTP client must recognise these five classes at a minimum. | |
enum HTTPStatusCode: Int, Error { | |
/// The response class representation of status codes, these get grouped by their first digit. | |
enum ResponseType { | |
/// - informational: This class of status code indicates a provisional response, consisting only of the Status-Line and optional headers, and is terminated by an empty line. | |
case informational |
#!/bin/bash | |
#Setup the environnement | |
mkdir wwdc2017 | |
cd wwdc2017 | |
mkdir tmp_download | |
cd tmp_download | |
#Extract IDs | |
echo "Downloading the index" |
// Swift's untyped errors are a goddam PiTA. Here's the pattern I use to try to work around this. | |
// The goal is basically to try to guarantee that every throwing function in the app throws an | |
// ApplicationError instead of some unknown error type. We can't actually enforce this statically | |
// But by following this convention we can simplify error handling | |
enum ApplicationError: Error, CustomStringConvertible { | |
// These are application-specific errors that may need special treatment | |
case specificError1 | |
case specificError2(SomeType) |
#!/usr/bin/env bash | |
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" | |
echo "" | |
echo "Download the official Dropbox app manually and sync relevant dotfiles" | |
echo "Press [Enter] to continue or [Ctrl-C] to cancel..." | |
read -p "" | |
echo "" |
import UIKit | |
import Foundation | |
// NOTE: This playground shows how to use Swift's AttributedString with Markdown. | |
// | |
// This code was used to display Markdown content in the Tot iOS Widget <https://tot.rocks> | |
// MARK: - Helpful Links | |
// NOTE: The following links helped me figure this stuff out. |
import SwiftUI | |
// MARK: - UIKit.UIView -> SwiftUI.View | |
public extension NSObjectProtocol where Self: UIView { | |
/// Creates a wrapper for a UIKit view that you use to integrate that view into your | |
/// SwiftUI view hierarchy. | |
/// | |
/// For best results set sensible values for [content compression resistance](https://developer.apple.com/documentation/uikit/uiview/1622526-setcontentcompressionresistancep), | |
/// and [content hugging priority](https://developer.apple.com/documentation/uikit/uiview/1622485-setcontenthuggingpriority) in your content view and it's immediate subviews. |
// | |
// MarkdownAttributedStringParser.swift | |
// Project X | |
// | |
// Created by Kieran Peppiatt on 2023-05-10. | |
// | |
/// Based on the source code from - https://github.com/christianselig/Markdownosaur/blob/main/Sources/Markdownosaur/Markdownosaur.swift | |
/// Building on from Xcoding with Alfian's lesson Add Markdown & Code Syntax Highlighting to ChatGPT iOS SwiftUI App - https://www.youtube.com/watch?v=DYD6_3JD7jk |