Skip to content

Instantly share code, notes, and snippets.

Harry Jordan inquisitiveSoft

Block or report user

Report or block inquisitiveSoft

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@inquisitiveSoft
inquisitiveSoft / Sift4.swift
Created Apr 17, 2015
A translation of Siderite Zackwehdex's Sift4 algorithm for ranking how close one string is to another, which is a few orders of magnitude faster than calculating the Levenshtein distance
View Sift4.swift
//
// Super Fast and Accurate string distance algorithm: Sift4
// http://siderite.blogspot.com/2014/11/super-fast-and-accurate-string-distance.html
//
public func sift4(firstString: String, secondString: String, maxOffset: Int = 5, maxDistance: Int? = nil) -> Int? {
if firstString.isEmpty {
return secondString.isEmpty ? 0 : count(secondString)
} else if secondString.isEmpty {
return count(firstString)
View Open With Xcode.rb
#!/usr/bin/ruby
# MIT License: http://www.opensource.org/licenses/MIT
require 'pathname'
require 'open3'
# read arguments
shouldBuild = FALSE
initialDirectory = Pathname.getwd
# Using a path to differentiate between multiple versions of Xcode
@inquisitiveSoft
inquisitiveSoft / UIImage+WithPDF.h
Last active Dec 31, 2018
A UIImage category to create images from PDF files, useful for resolution independent UI elements.
View UIImage+WithPDF.h
// Copyright Harry Jordan, 2012 http://inquisitivesoftware.com/
// Open source under the MIT license http://www.opensource.org/licenses/MIT
#import <UIKit/UIKit.h>
#import <CoreGraphics/CoreGraphics.h>
@interface UIImage (AJKImageWithPDF)
You can’t perform that action at this time.