Instantly share code, notes, and snippets.

View ConvertInvocationArguments.m
NSString *MTExtractStructName(NSString *typeEncodeString)
{
NSArray *array = [typeEncodeString componentsSeparatedByString:@"="];
NSString *typeString = array[0];
int firstValidIndex = 0;
for (int i = 0; i< typeString.length; i++) {
char c = [typeString characterAtIndex:i];
if (c == '{' || c=='_') {
firstValidIndex++;
}else {
View LRUCache.swift
class CacheGenerator<T:Hashable> : IteratorProtocol {
typealias Element = T
var counter: Int
let array:[T]
init(keys:[T]) {
counter = 0
array = keys
View pptp.sh
#!/bin/sh
if [ `id -u` -ne 0 ]
then
echo "please run it by root"
exit 0
fi
apt-get -y update
apt-get -y install pptpd || {
View Credit.h
#import <UIKit/UIKit.h>
@interface Credit : UILabel
-(void)autochangeFontsize:(double) number;
-(void)changeFromNumber:(double) originalnumber toNumber:(double) newnumber withAnimationTime:(NSTimeInterval)timeSpan;
@end
View Graph.h
//
// Graph.h
// ColorAtom
//
// Created by 杨萧玉 on 14-4-21.
// Copyright (c) 2014年 杨萧玉. All rights reserved.
//
#import <Foundation/Foundation.h>
@import SpriteKit;