Skip to content

Instantly share code, notes, and snippets.

Chris Dzombak cdzombak

Block or report user

Report or block cdzombak

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dbergey
dbergey / gist:2695699
Created May 14, 2012
don't switch chat tabs when switching to chat app
View gist:2695699
tell application "System Events"
if (count of (every application process whose name is "iChat")) > 0 then
activate application "iChat"
else
activate application "Adium"
end if
end tell
anonymous
anonymous / gist:2767637
Created May 22, 2012
Wiggling Animation
View gist:2767637
CABasicAnimation* animation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
[animation setToValue:[NSNumber numberWithFloat:-M_PI/128]];
[animation setFromValue:[NSNumber numberWithDouble:M_PI/128]];
[animation setDuration:0.09];
[animation setRepeatCount:NSUIntegerMax];
[animation setAutoreverses:YES];
@alloy
alloy / DEA-providers.rb
Created May 24, 2012
List of ‘disposable email address’-provider hostnames. Collected from http://bit.ly/Jt6FZU & http://bit.ly/JKNcYC.
View DEA-providers.rb
[".e4ward.com",
".mailexpire.com",
".otherinbox.com",
"0815.ru",
"0clickemail.com",
"0wnd.net",
"0wnd.org",
"10minutemail.com",
"20minutemail.com",
"2prong.com",
@javan
javan / sl2-setup.md
Created Jul 23, 2012
My Sublime Text 2 setup
View sl2-setup.md
@piscisaureus
piscisaureus / pr.md
Created Aug 13, 2012
Checkout github pull requests locally
View pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@andrewsardone
andrewsardone / gist:3701925
Created Sep 11, 2012
Necessary HIG-compliant tasks to perform in UIViewController subclass with a UITableView
View gist:3701925

To conform to Apple's human-interface guidelines, you need to implement the following tasks when subclassing UIViewController and including a UITableView in your hierarchy (hence recreating UITableViewController):

Clear any selection in the table view before it's displayed

In -[UIViewController viewWillAppear:], clear the selected row (if any) by sending the -[UITableView deselectRowAtIndexPath:animated:] message.

Flash scroll view's scroll indicators

In -[UIViewController viewDidAppear:], send the -[UITableView flashScrollIndicators] message.

@bstahlhood
bstahlhood / UIImage+Retina4.h
Created Sep 13, 2012
Swizzled UIImage imageNamed for iPhone 5
View UIImage+Retina4.h
//
// UIImage+Retina4.h
// StunOMatic
//
// Created by Benjamin Stahlhood on 9/12/12.
// Copyright (c) 2012 DS Media Labs. All rights reserved.
//
#import <UIKit/UIKit.h>
@andrewsardone
andrewsardone / gist:3723354
Created Sep 14, 2012
NSKeyValueObserving's use of a context pointer for identifying interested observations
View gist:3723354

The NSKeyValueObserving addition to NSObject adds an observe message that takes an identifying context pointer – don't use NULL in its place.

Your superclass may observe the same key path for the same object. You need to pass along its observations, and only take actions on yours. The context pointer distinguishes which observations are yours.

static void *kContext = &kContext;
@nikcub
nikcub / README.md
Created Oct 4, 2012
Facebook PHP Source Code from August 2007
View README.md
@mattt
mattt / uiappearance-selector.md
Last active Nov 4, 2019
A list of methods and properties conforming to `UIAppearance` as of iOS 12 Beta 3
View uiappearance-selector.md

Generate the list yourself:

$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.sdk/System/Library/Frameworks/UIKit.framework/Headers
$ grep UI_APPEARANCE_SELECTOR ./*     | \
  sed 's/NS_AVAILABLE_IOS(.*)//g'     | \
  sed 's/NS_DEPRECATED_IOS(.*)//g'    | \
  sed 's/API_AVAILABLE(.*)//g'        | \
  sed 's/API_UNAVAILABLE(.*)//g'      | \
  sed 's/UI_APPEARANCE_SELECTOR//g'   | \
You can’t perform that action at this time.