Skip to content

Instantly share code, notes, and snippets.

@dstd
dstd / inthash.md
Last active August 29, 2015 14:21 — forked from badboy/inthash.md
@dstd
dstd / ViewController.swift
Created October 21, 2015 08:29 — forked from quellish/ViewController.swift
ViewController.swift
import UIKit
import CoreData
import AVFoundation
class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource, VPDAODelegateProtocol, NSFetchedResultsControllerDelegate {
@IBOutlet weak var segmentedControl: UISegmentedControl!
@IBOutlet weak var tableView: UITableView!
lazy var managedObjectContext : NSManagedObjectContext? = {
@dstd
dstd / gist:b2192efbf9ec56b66d4b
Created December 23, 2015 07:52 — forked from mipmip/gist:1844353
Mac OS X: restart mDNSResponder
Load up Terminal (Applications > Utilities > Terminal.app) and type the following.
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
To turn it back on, just do the opposite:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
@dstd
dstd / Progressive image loading for iOS
Created March 10, 2016 22:37 — forked from foundry/Progressive image loading for iOS
Progressive image loading for iOS. This is a GIST - detailed implementation is left as an exercise for the reader.
/*
typical usage (FYImageStore is a singleton)
[[FYImageStore instance] retrieveFullsizeImageFromPath:path
completion:^(UIImage* image){
self.imageView.image = image
}];
*/
#import "FYImageURL.h" //URL-building utilities, omitted from this Gist.