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
@mingsai
mingsai / JSON.swift
Created February 12, 2016 19:42 — forked from jparishy/JSON.swift
//
// JSON.swift
// Swerver
//
// Created by Julius Parishy on 12/12/15.
// Copyright © 2015 Julius Parishy. All rights reserved.
//
import Foundation
import Foundation
let bufferSize = 1024*1024
enum Error: ErrorType {
case UnknownArgument(String)
case MissingValue(String)
case MissingPassword
case ShortWrite
case ReadError(NSError?)
@mingsai
mingsai / NSStream.swift
Created February 12, 2016 19:40 — forked from ishikawa/NSStream.swift
Generic read/write method
extension NSInputStream {
func read<T : Integer>() -> T? {
var buffer : T = 0
let n = withUnsafePointer(&buffer) { (p) in
self.read(UnsafePointer<UInt8>(p), maxLength: sizeof(T))
}
if n > 0 {
@mingsai
mingsai / IO.swift
Last active February 12, 2016 19:33 — forked from alecthomas/IO.swift
A Swift class to use low-level I/O efficiently. Requires attached Swift String extensions to compensate for missing API calls in Swift 2.2 (specifically the .NS namespace to link to NSString.
//
// IO.swift
//
//
// Created by Tommie N. Carter, Jr., MBA on 2/12/16.
// Copyright © 2016 MING Technology. All rights reserved.
//
// Based on work of:
//
// Swift.IO
//
// PSPDFThreadSafeMutableDictionary.m
//
// Copyright (c) 2013 Peter Steinberger, PSPDFKit GmbH. 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
// Taken from the commercial iOS PDF framework http://pspdfkit.com.
// Copyright (c) 2013 Peter Steinberger. All rights reserved.
// Licensed under MIT (http://opensource.org/licenses/MIT)
//
// You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it.
#import <objc/runtime.h>
#import <objc/message.h>
// Compile-time selector checks.

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?

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.

//
// UIImage+ImageSplitting.h
// Test
//
// Created by Robert Saunders on 03/02/2012.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
//
// 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>