Skip to content

Instantly share code, notes, and snippets.

View zzz6519003's full-sized avatar
🏀
Trying to Find a Team

Sam Snowman(赵正中) zzz6519003

🏀
Trying to Find a Team
View GitHub Profile
what the hell
@zzz6519003
zzz6519003 / gist:5080315
Created March 4, 2013 06:16
This is just a gist to see if it counts
This is just a gist to see if it counts
- (BOOL)isMobileNumber:(NSString *)mobileNum
{
/**
* 手机号码
* 移动:134[0-8],135,136,137,138,139,150,151,157,158,159,182,187,188
* 联通:130,131,132,152,155,156,185,186
* 电信:133,1349,153,180,189
*/
NSString * MOBILE = @"^1(3[0-9]|5[0-35-9]|8[025-9])\\d{8}$";
/**
testtest
@zzz6519003
zzz6519003 / index.html
Created February 20, 2014 14:53
A Pen by Volodymyr.
<canvas id="olympic"></canvas>
@zzz6519003
zzz6519003 / UIImageView+Reflect.h
Created March 25, 2014 12:38
A simple category that creates a relection view for your UIImageView.
//
// UIImageView+Reflect.h
// UIImageView-Reflect
//
// Created by Snowmanzzz on 3/19/14.
// Copyright (c) 2014 zzz. All rights reserved.
//
#import <UIKit/UIKit.h>

Step 1: Clone the bundles into your Sublime Text packages directory

cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
git clone git://github.com/jashkenas/coffee-script-tmbundle CoffeeScript
git clone https://github.com/miksago/jade-tmbundle.git Jade
git clone https://github.com/LearnBoost/stylus.git Stylus

Step 2: Restart Sublime Text 2

@zzz6519003
zzz6519003 / gist:078cceccdc2ffd76e482
Created July 18, 2014 07:18
rtPushViewController
- (void)rtPushViewController:(UIViewController *)viewController animated:(BOOL)animated{
if ([self respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithTitle:@"返回" style:UIBarButtonItemStyleBordered target:self action:nil];
self.topViewController.navigationItem.backBarButtonItem = backItem;
[backItem release];
} else {
UIImage *image = [UIImage iconForNavBack];
UIImage *highlighted = [UIImage iconForNavBackSelected];
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
button.frame = CGRectMake(0, 0, image.size.width, 44);
@zzz6519003
zzz6519003 / gist:c290ad8afbfce7d67770
Last active August 29, 2015 14:04
为什么不应该把cell给替换成view
-----------------
C |
|
------------ |
A | |
a | |
| |
b |
------------ |
B |
@zzz6519003
zzz6519003 / gist:c247db4e382b56f1898c
Last active August 29, 2015 14:05
Ultrasound communication
http://rnd.azoft.com/mobile-app-transering-data-using-ultrasound/
https://github.com/davisappdev/libultrasound-ios this one's wired, i don't even know how to correctly use it...