Skip to content

Instantly share code, notes, and snippets.

Avatar
😎
hack the planet

Chris Schepman cschep

😎
hack the planet
View GitHub Profile
@stinger
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") {
print("\(myTimezone.identifier)")
@SlaunchaMan
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;
@end
@cormacrelf
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" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Spacedust</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
View Spacedust.dvtcolortheme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>0.052 0.489 0.482 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>Menlo-Bold - 11.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>0.432 0.325 0.276 1</string>
You can’t perform that action at this time.