Skip to content

Instantly share code, notes, and snippets.

Tommie N. Carter, Jr., BSIT, MBA mingsai

Block or report user

Report or block mingsai

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

Generate the list yourself:

$ cd /Applications/


import os.path as path
import string
import argparse
import glob
import re
def basename(filename):
base = filename
if filename.find('@2x') > 0:
base = filename[:filename.find('@2x')]
View generate-image-defines
#!/usr/bin/env python
import os.path as path
import string
import argparse
import glob
import re
import array
import os
View gist:6340865
expr -- (void)printf("[%s, %s]\n",(char *) object_getClassName(*(long*)($esp+4)), (char *) *(long *)($esp+8) )
View NSObject+setValuesForKeysWithJSONDictionary.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>
mingsai / autogenbuild
Created Oct 22, 2013
Below is a simple bash script that uses the PlistBuddy executable on MacOSX to generate an auto increment versioning script. To use: Open Xcode 5 Select Project > Build Phases Click Menu: Editor > Add Build Phase > Add Run Script Build Phase Click into White Text Box Below Run Script and Paste Contents of Gist
View autogenbuild
# Auto Increment Version Script
echo $buildPlist
CFSVString=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "$buildPlist")
CFBundleVersion=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$buildPlist")
#echo $BUILD_NR
View UIImage+ImageSplitting.h
// UIImage+ImageSplitting.h
// Test
// Created by Robert Saunders on 03/02/2012.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
#import <UIKit/UIKit.h>
View Contract Killer

Contract Killer 3

Revised date: 07/11/2012

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


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.

View Three Wise

Date: [date]

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


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

What’s confidential information?

mingsai / automator_script
Created Mar 23, 2014
Convert Chinese Characters to Pinyi
View automator_script
# Assumes you have rdef utility installed in /usr/local/bin
# rdef can be found here:
# See accompanying readme.txt for instructions to create MacOSX service
export PATH
for ((i=0;i<${#x};i++)); do rdef "${x:i:1}" | awk -F '\|' 'BEGIN {ORS=" "}{ gsub(/^ | +?/, "", $2); if (length($2) > 0) print $2 ; exit}'; done
You can’t perform that action at this time.