Skip to content

Instantly share code, notes, and snippets.

View tangqiaoboy's full-sized avatar

Tang Qiao tangqiaoboy

View GitHub Profile
@tangqiaoboy
tangqiaoboy / iOS 技能图谱.md
Last active February 10, 2024 12:43
iOS 技能图谱

编程语言

  • Swift
  • Objective-C
  • C++/C
  • JavaScript

操作系统

  • Mac OSX
  • iOS
@tangqiaoboy
tangqiaoboy / 0_reuse_code.js
Created May 28, 2014 10:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@tangqiaoboy
tangqiaoboy / UIView+frameAdjust.h
Last active March 25, 2020 04:18
Adjust UIView frame category
//
// UIView+frameAdjust.h
// fenbi
//
// Created by Tang Qiao on 12-5-31.
// Copyright (c) 2012年 Fenbi.com . All rights reserved.
//
#import <Foundation/Foundation.h>
- (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext
{
UIView *container = transitionContext.containerView;
UIViewController *fromVC = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey];
UIViewController *toVC = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey];
UIView *fromView = fromVC.view;
UIView *toView = toVC.view;
CGRect beginFrame = CGRectMake(UI_SCREEN_WIDTH, 0, UI_SCREEN_WIDTH, UI_SCREEN_HEIGHT);
@tangqiaoboy
tangqiaoboy / javascript.js
Created August 23, 2012 05:17
编程计算,由1、2、3、4、5、6六个数码中的五个不同数码组成五位数,把所有组成的五位数按由小到大排序输出。
var flag = [];
var ans = [];
function solve(idx) {
if (idx == 5) {
console.log(ans.join(''));
return;
}
for (var i = 1; i <= 6; ++i) {
if (!flag[i]) {
flag[i] = true;
@tangqiaoboy
tangqiaoboy / git-svn-diff.sh
Created February 14, 2012 10:20 — forked from MikePearce/git-svn-diff.sh
生成git-svn下svn兼容的diff文件
#!/bin/bash
# Get the tracking branch (if we're on a branch)
TRACKING_BRANCH=`git svn info | grep URL `
# If the tracking branch has 'URL' at the beginning, then the sed wasn't successful and
# we'll fall back to the svn-remote config option
if [[ "$TRACKING_BRANCH" =~ URL.* ]]
then
@tangqiaoboy
tangqiaoboy / gist:1519172
Created December 25, 2011 12:19
objective c test code
+ (ImageCache *) sharedInstance {
if (instance == nil) {
@synchronized(self) {
if (instance == nil) {
instance = [[ImageCache alloc] init];
}
}
}
return instance;
}