Skip to content

Instantly share code, notes, and snippets.

@omarrr
omarrr / gist:6662014
Last active April 4, 2016 21:25
Create arrays with Jekyll's Liquid syntax (http://jekyllrb.com/docs/templates/)
{% assign myArray = "1,2,3" | split: "," %}
@mackuba
mackuba / wwdc16.md
Last active March 5, 2023 21:28
New stuff from WWDC 2016

Following the tradition from last year, here's my complete list of all interesting features and updates I could find in Apple's OSes, SDKs and developer tools that were announced at this year's WWDC. This is based on the keynotes, the "What's New In ..." presentations and some others, Apple's release notes, and blog posts and tweets that I came across in the last few weeks.

If for some reason you haven't watched the talks yet, I really recommend watching at least the "State of the Union" and the "What's New In" intros for the platforms you're interested in. The unofficial WWDC Mac app is great way to download the videos and keep track of what you've already watched.

If you're interested, here are my WWDC 2015 notes (might be useful if you're planning to drop support for iOS 8 now and start using some iOS 9 APIs).


OSX → macOS 10.12 Sierra

import Foundation
// Inspired by https://gist.github.com/mbuchetics/c9bc6c22033014aa0c550d3b4324411a
struct JSONCodingKeys: CodingKey {
var stringValue: String
init?(stringValue: String) {
self.stringValue = stringValue
}
@robertmryan
robertmryan / Database.swift
Last active March 25, 2023 07:59
Minimalist SQLite wrapper for Swift
//
// Database.swift
//
// Created by Robert Ryan on 3/8/19.
// Copyright © 2019 Robert Ryan. All rights reserved.
//
import Foundation
import SQLite3
@yamoridon
yamoridon / DataTaskPublisher.swift
Created June 10, 2019 15:16
DataTaskPublisherを作ってみた
import Foundation
import Combine
struct DataTaskSubscription: Subscription {
let task: URLSessionTask
let combineIdentifier: CombineIdentifier
func request(_ demand: Subscribers.Demand) {
}

This page is now depreacted!

Check out the repo instead. The Wisdom of Quinn Now with 100% more archived PDFs.

The Wisdom of Quinn

Informative DevForum posts from everyone's favorite DTS member.

(Arranged newest to oldest)

@merlinmann
merlinmann / wisdom.md
Last active April 17, 2024 21:52
Merlin's Wisdom Project (Draft)

Merlin's Wisdom Project

Or: “Everybody likes being given a glass of water.”

By Merlin Mann.

It's only advice for you because it had to be advice for me.

import Foundation
import Observation
actor NumberViewModel: Observable {
// MARK: - Number
private let _numberStorage: UnsafeMutablePointer<Int> = .allocate(capacity: 1)
private nonisolated var _number: Int {
get {
observationRegistrar.access(self, keyPath: \._number)