Skip to content

Instantly share code, notes, and snippets.

View jackd942's full-sized avatar

Jack Davis jackd942

View GitHub Profile
@jackd942
jackd942 / dupe-finder.js
Created January 17, 2017 19:27 — forked from chrisckchang/dupe-finder.js
Aggregation query to find duplicate key values
// Desired unique index:
// db.collection.ensureIndex({ firstField: 1, secondField: 1 }, { unique: true})
db.collection.aggregate([
{ $group: {
_id: { firstField: "$firstField", secondField: "$secondField" },
uniqueIds: { $addToSet: "$_id" },
count: { $sum: 1 }
}},
{ $match: {
@jackd942
jackd942 / ColorExt.swift
Last active March 21, 2016 16:30
Extension to UIColor for use in Devslopes App
//
// Color+DAButton.swift
//
// Created by Jack Davis on 2/21/16.
// Copyright © 2016 Nine-42 LLC. All rights reserved.
//
import UIKit
@jackd942
jackd942 / CGFloatExt.swift
Created February 27, 2016 20:54
Extension to CGFloat for use in Devslopes App
//
// CGFloatExt.swift
// devslopes-app
//
// Created by Jack Davis on 2/21/16.
// Copyright © 2016 Devslopes. All rights reserved.
//
import UIKit
@jackd942
jackd942 / DATextField.swift
Last active November 20, 2017 12:45
Custom IBDesignable and IBInspectable UITextField created for use in the Devslopes App
//
// DATextField.swift
// devslopes-app
//
// Created by Jack Davis on 2/26/16.
// Copyright © 2016 Devslopes. All rights reserved.
//
import UIKit
@jackd942
jackd942 / DAPolyButton.swift
Created February 27, 2016 20:41
Custom IBDesignable and IBInspectable Polygon UIButton created for use in the Devslopes App
//
// DAPolyButton.swift
//
// Created by Jack Davis on 2/21/16.
// Copyright © 2016 Nine-42 LLC. All rights reserved.
//
import UIKit
@IBDesignable
@jackd942
jackd942 / DAButton.swift
Created February 27, 2016 20:39
Custom IBDesignable and IBInspectable UIButton created for use in the Devslopes App
//
// DAButton.swift
//
// Created by Jack Davis on 2/20/16.
// Copyright © 2016 Nine-42 LLC. All rights reserved.
//
// Custom UIButton class designed for Devslopes App.
//
//