This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Cache<T> { | |
private lazy var objects = [String : T]() | |
func object(forKey key: String) -> T? { | |
return objects[key] | |
} | |
func addObject(_ object: T, forKey key: String) { | |
objects[key] = object | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Toine Heuvelmans, November 2016 | |
# A small script that helps you removing Xcode-related data. | |
# This can potentially save many Gigabytes. | |
# Just run `ruby xcode_cleanup.rb`. | |
require 'fileutils' | |
require 'date' | |
require 'rubygems' |