Skip to content

Instantly share code, notes, and snippets.

View crespoxiao's full-sized avatar

Chengfei Xiao crespoxiao

View GitHub Profile
@crespoxiao
crespoxiao / AlertClass
Created December 30, 2013 13:27
this is CrespoXiao's gists
//
// TCNetworkAlertView.h
// KanKanIphone
//
// Created by CrespoXiao on 13-11-26.
//
//
#import <UIKit/UIKit.h>
@crespoxiao
crespoxiao / baseband
Last active August 29, 2015 13:57 — forked from shenqiliang/baseband
//http://blog.xcodev.com/archives/iphone-baseband-intro/
#import <Foundation/Foundation.h>
#import <termios.h>
#import <time.h>
#import <sys/ioctl.h>
NSString *sendATCommand(NSFileHandle *baseBand, NSString *atCommand){
NSLog(@"SEND AT: %@", atCommand);
//http://blog.xcodev.com/archives/access-iphone-simcard-contacts-via-baseband/
#import <Foundation/Foundation.h>
#import <termios.h>
#import <time.h>
#import <sys/ioctl.h>
//UCS2编码支持
@implementation NSString(UCS2Encoding)
//http://blog.xcodev.com/archives/send-sms-via-iphone-baseband/
#import <Foundation/Foundation.h>
#import <termios.h>
#import <time.h>
#import <sys/ioctl.h>
@implementation NSString(UCS2Encoding)
http://devstreaming.apple.com/videos/wwdc/2014/403xxksrj0qs8c0/403/403_hd_intermediate_swift.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/403xxksrj0qs8c0/403/403_sd_intermediate_swift.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/403xxksrj0qs8c0/403/403_intermediate_swift.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/419xxli6f60a6bs/419/419_hd_advanced_graphics_and_animation_performance.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/419xxli6f60a6bs/419/419_sd_advanced_graphics_and_animation_performance.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/419xxli6f60a6bs/419/419_advanced_graphics_and_animation_performance.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/101xx36lr6smzjo/101/101_hd.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/101xx36lr6smzjo/101/101_sd.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/236xxwk3fv82sx2/236/236_hd_building_interruptible_and_responsive_interactions.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2
var githubList = [
{
name:'系统基础库',
list: [
{name:'Category/Util',
list: [
{name:'sstoolkit', owner:'soffes', desc:'一套Category类型的库,附带很多自定义控件 功能不错~'},
{name:'BlocksKit', owner:'pandamonia', desc:'将Block风格带入UIKit和Founcation'},
{name:'cocoa-helpers', owner:'enormego', desc:'一些Cocoa的扩展 2年前的工程'},
@crespoxiao
crespoxiao / gist:53f9d4006ab2a90de543
Created November 24, 2014 07:15
build_ffmpeg_ios_armv7_armv7s_arm64_i386_x84_64.sh
#!/bin/sh
# directories
SOURCE="ffmpeg-2.4.3"
FAT="FFmpeg-iOS"
SCRATCH="scratch"
# must be an absolute path
THIN=`pwd`/"thin"
# absolute path to x264 library
@interface ApplicationDelegate<UIApplicationDelegate>
@end
@implementation ApplicationDelegate
- (RACSignal *)rac_registeredForRemoteNotifications {
RACSignal *signal = objc_getAssociatedObject(self, _cmd);
if (signal != nil) return signal;
RACSignal *didRegisterForRemoteNotification = [[self rac_signalForSelector: @selector(application:didRegisterForRemoteNotificationsWithDeviceToken:) fromProtocol: @protocol(UIApplicationDelegate)] map: ^(RACTuple *tuple) {
return tuple.second;
@crespoxiao
crespoxiao / gist:a4fbd45d2368f20bb4d8
Last active February 10, 2017 03:04 — forked from kwylez/gist:5301597
Custom UIViewTransition Example
- (void)transitionFromViewController:(UIViewController *)fromViewController
toViewController:(UIViewController *)toViewController
withAnimationType:(EPBUIViewAnimationTransition)animation
fromFrame:(CGRect)aFrame
withOverLayImage:(NSString *)overlayName {
static NSInteger standardImageTag = 9999;
if (fromViewController == toViewController) {
return;
//
// ONEObserverStore.h
// OneTravel
//
// Created by xiaochengfei on 15/8/18.
// Copyright (c) 2015年 Didi.Inc. All rights reserved.
//
#import <ONEBaseStore/ONEBaseStore.h>