Skip to content

Instantly share code, notes, and snippets.

View tangqiaoboy's full-sized avatar

Tang Qiao tangqiaoboy

View GitHub Profile
@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
- (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 / 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