Skip to content

Instantly share code, notes, and snippets.

View mingsai's full-sized avatar
🎯
Focusing

Tommie N. Carter, Jr. mingsai

🎯
Focusing
View GitHub Profile
#!/usr/bin/env python
import os.path as path
import string
import argparse
import glob
import re
import array
import os
expr -- (void)printf("[%s, %s]\n",(char *) object_getClassName(*(long*)($esp+4)), (char *) *(long *)($esp+8) )
//
// NSObject+setValuesForKeysWithJSONDictionary.h
// SafeSetDemo
//
// Created by Tom Harrington on 12/29/11.
// Copyright (c) 2011 Atomic Bird, LLC. All rights reserved.
//
#import <Foundation/Foundation.h>
//
// UIImage+ImageSplitting.h
// Test
//
// Created by Robert Saunders on 03/02/2012.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

Date: [date]

Between us [company name] and you [customer name].

Summary:

In short; neither of us will share any confidential information about each-other, by any means, with anyone else.

What’s confidential information?

@mingsai
mingsai / MNGDataExtensions.swift
Last active February 12, 2016 14:53
A reader to quickly process data using a stream
extension NSData {
func mng_enumerateComponentsSeparatedBy(delimiter:NSData, block:(data:NSData,finalBlock:Bool) -> () ){
var loc:Int = 0
while true {
let rangeOfNewline = self.rangeOfData(delimiter, options: NSDataSearchOptions.Anchored, range:NSMakeRange(loc, self.length - loc))
if rangeOfNewline.location == NSNotFound {
break
}
@mingsai
mingsai / Compression.swift
Last active February 12, 2016 17:38
A set of functions to convert an entire NSManagedObject graph to a dictionary using recursion. The advanced version fixes issues with related objects that were performing endless recursion. I found that when storing large data files (video) it was prudent to import the libz.x.x.x.tb and the libcompression.tb frameworks. Note the NSData compressi…
//
// Compression.swift
//
//
// Created by Tommie N. Carter, Jr., MBA on 2/11/16.
// Copyright © 2016 MING Technology. All rights reserved.
//
import Foundation
@mingsai
mingsai / MNGImageToDataTransformer.swift
Created February 12, 2016 17:47
A Swift class to manage image to data value transformations for use with Core Data
//
// MNGImageToDataTransformer.swift
//
//
// Created by Tommie N. Carter, Jr., MBA on 9/11/15.
// Copyright © 2015 MING Technology. All rights reserved.
//
import UIKit
@mingsai
mingsai / DictionaryExtensions.swift
Created February 12, 2016 17:50
Swift Dictionary extensions to return all keys for a value, et al.
//
// DictionaryExtensions.swift
//
//
// Created by Tommie N. Carter, Jr., MBA on 12/14/15.
// Copyright © 2015 MING Technology. All rights reserved.
//
import Foundation