Skip to content

Instantly share code, notes, and snippets.

hack the planet

Chris Schepman cschep

hack the planet
View GitHub Profile
View TextAlert.swift
// ContentView.swift
// Created by Chris Eidhof on 20.04.20.
// Copyright © 2020 All rights reserved.
import SwiftUI
import UIKit
stinger / Swift3Dates.swift
Last active May 21, 2018
Swift 3: Working with dates
View Swift3Dates.swift
//: # Swift 3: Working with dates
import Foundation
let date = Date()
let myLocale = Locale(identifier: "bg_BG")
//: ### Setting an application-wide `TimeZone`
//: Notice how we use if-let in case the abbreviation is wrong. It will fallback to the default timezone in that case.
if let myTimezone = TimeZone(abbreviation: "EEST") {
SlaunchaMan / CLKTextProvider+NNNCompoundTextProviding.h
Created Aug 24, 2015
Getting around Swift 2’s lack of compatibility with vararg methods for complication text providers.
View CLKTextProvider+NNNCompoundTextProviding.h
@interface CLKTextProvider (NNNCompoundTextProviding)
+ (nonnull CLKTextProvider *)nnn_textProviderByJoiningProvider:(nonnull CLKTextProvider *)provider1 andProvider:(nonnull CLKTextProvider *)provider2 withString:(nullable NSString *)joinString;
cormacrelf / Spacedust.tmTheme
Created Jun 12, 2011
Spacedust TextMate theme - hand-transferred from Xcode
View Spacedust.tmTheme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
View Spacedust.dvtcolortheme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<string>0.052 0.489 0.482 1</string>
<string>Menlo-Bold - 11.0</string>
<string>0.432 0.325 0.276 1</string>