Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Always learning!

Bennett Smith BennettSmith

💭
Always learning!
  • San Francisco Bay Area, CA
View GitHub Profile
@fikeminkel
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
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;
@end
@interface NSDate (EXIFGPS)
@kogakure
kogakure / django_2012.md
Created May 5, 2012 — forked from trey/django_2012.md
Bash: How to start a Django project in 2012
View django_2012.md

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
BennettSmith / .gitignore
Created Dec 10, 2011
Create a 1Hut Linux Template on Parallels
View .gitignore
.DS_Store
*.iso