Skip to content

Instantly share code, notes, and snippets.

Always learning!

Bennett Smith BennettSmith

Always learning!
  • San Francisco Bay Area, CA
View GitHub Profile
fikeminkel / DNSTxtRecord.swift
Created Apr 26, 2017
Swift 3.1 DNS TXT record lookup
View DNSTxtRecord.swift
import dnssd
struct DNSTxtRecord {
typealias DNSLookupHandler = ([String: String]?) -> Void
static func lookup(_ domainName: String, completionHandler: @escaping DNSLookupHandler) {
var mutableCompletionHandler = completionHandler // completionHandler needs to be mutable to be used as inout param
let callback: DNSServiceQueryRecordReply = {
(sdRef, flags, interfaceIndex, errorCode, fullname, rrtype, rrclass, rdlen, rdata, ttl, context) -> Void in
phildow / CLLocation+EXIFGPS.h
Last active Dec 2, 2019
Category to create GPS metadata dictionary from CLLocation and CLHeading for writing to EXIF data in images.
View CLLocation+EXIFGPS.h
#import <CoreLocation/CoreLocation.h>
#import <ImageIO/ImageIO.h>
@interface CLLocation (EXIFGPS)
- (NSDictionary*) EXIFMetadataWithHeading:(CLHeading*)heading;
@interface NSDate (EXIFGPS)
kogakure /
Created May 5, 2012 — forked from trey/
Bash: How to start a Django project in 2012

How to start a Django project in 2012

(and deploy to Heroku)

First, warm up your system.

$ easy_install pip
$ pip install virtualenv
$ pip install django
$ gem install heroku
BennettSmith / .gitignore
Created Dec 10, 2011
Create a 1Hut Linux Template on Parallels
View .gitignore