Skip to content

Instantly share code, notes, and snippets.

Justin Driscoll jdriscoll

Block or report user

Report or block jdriscoll

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
@jdriscoll
jdriscoll / feather_oled_demo.ino
Last active Nov 19, 2017
Adafruit Feather + OLED Wing demo
View feather_oled_demo.ino
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 display = Adafruit_SSD1306();
#if defined(ESP8266)
#define BUTTON_A 0
#define BUTTON_B 16
View keybase.md

Keybase proof

I hereby claim:

  • I am jdriscoll on github.
  • I am jdriscoll (https://keybase.io/jdriscoll) on keybase.
  • I have a public key whose fingerprint is 019B 34DA 7585 1BA0 84FF AD16 AA0C 4F12 8190 ECAF

To claim this, I am signing this object:

@jdriscoll
jdriscoll / clock.swift
Created Aug 22, 2016
5 minute interval clock
View clock.swift
// Copyright (c) 2016 Justin Driscoll <justin@driscolldev.com>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
@jdriscoll
jdriscoll / Queries.sql
Last active Aug 29, 2015
Load SQL queries from text file
View Queries.sql
-- all_things
SELECT * FROM things
-- thing_with_id
SELECT * FROM things WHERE id = :id
@jdriscoll
jdriscoll / Layout.swift
Last active Oct 28, 2016
Simple Swift Auto Layout Extensions
View Layout.swift
//
// Layout.swift
//
// Created by Justin Driscoll on 2/22/15.
//
import UIKit
struct Inset {
let value: CGFloat
@jdriscoll
jdriscoll / build.sh
Created Jul 25, 2014
AGVTool wrapper for Xcode projects
View build.sh
#!/usr/bin/env sh
if git diff-index --quiet HEAD --; then
agvtool next-version -all
if [ $# -eq 1 ]
then
agvtool new-marketing-version "$1"
fi
@jdriscoll
jdriscoll / arrayDiff.m
Last active Aug 29, 2015
Get differences between two NSArrays (for animating table view changes)
View arrayDiff.m
void arrayDiff(NSArray *array1, NSArray *array2, NSSet **objectsToAdd, NSSet **objectsToRemove, NSSet **objectsInBoth) {
if (array1 == nil) {
*objectsToAdd = [NSSet setWithArray:array2];
*objectsToRemove = [NSSet set];
*objectsInBoth = [NSSet set];
}
else if (array2 == nil) {
*objectsToAdd = [NSSet set];
*objectsToRemove = [NSSet setWithArray:array1];
View XMLObjectMapper.h
//
// XMLObjectMapper.h
// Copyright (c) 2014 Justin Driscoll All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@jdriscoll
jdriscoll / MutableObjInSet.m
Last active Aug 29, 2015
Mutable objects in set
View MutableObjInSet.m
#import <Foundation/Foundation.h>
void logIt(NSSet *set) {
NSLog(@"set: %@", set);
for (id object in set) {
NSLog(@"element with hash: %lu", (unsigned long)[object hash]);
}
}
int main(int argc, char *argv[]) {
View keybase.md

Keybase proof

I hereby claim:

  • I am jdriscoll on github.
  • I am jdriscoll (https://keybase.io/jdriscoll) on keybase.
  • I have a public key whose fingerprint is AFDB 03DF A37F 194A B15B FEB6 A478 146D 9D51 5207

To claim this, I am signing this object:

You can’t perform that action at this time.