Skip to content

Instantly share code, notes, and snippets.

View BennettSmith's full-sized avatar
💭
Always learning!

Bennett Smith BennettSmith

💭
Always learning!
  • San Francisco Bay Area, CA
  • 10:21 (UTC -07:00)
View GitHub Profile
@BennettSmith
BennettSmith / .gitignore
Created December 10, 2011 15:08
Create a 1Hut Linux Template on Parallels
.DS_Store
*.iso
@kogakure
kogakure / django_2012.md
Created May 5, 2012 09:41 — forked from trey/django_2012.md
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
@phildow
phildow / CLLocation+EXIFGPS.h
Last active December 2, 2019 02:37
Category to create GPS metadata dictionary from CLLocation and CLHeading for writing to EXIF data in images.
#import <CoreLocation/CoreLocation.h>
#import <ImageIO/ImageIO.h>
@interface CLLocation (EXIFGPS)
- (NSDictionary*) EXIFMetadataWithHeading:(CLHeading*)heading;
@end
@interface NSDate (EXIFGPS)
@fikeminkel
fikeminkel / DNSTxtRecord.swift
Created April 26, 2017 20:56
Swift 3.1 DNS TXT record lookup
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