This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Call removeTarget:action:forControlEvents: pass nil for the target, NULL for action, and use a control mask that sets all bits (UIControlEventAllEvents). Something like this: | |
[someControl removeTarget:nil | |
action:NULL | |
forControlEvents:UIControlEventAllEvents]; | |
https://developer.apple.com/library/ios/#documentation/uikit/reference/UIControl_Class/Reference/Reference.html | |
http://stackoverflow.com/questions/3340825/uibutton-remove-all-target-actions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (UIImage*)imageNamedForDevice:(NSString*)name { | |
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) | |
{ | |
if (([UIScreen mainScreen].bounds.size.height * [UIScreen mainScreen].scale) >= 1136.0f) | |
{ | |
//Check if is there a path extension or not | |
if (name.pathExtension.length) { | |
name = [name stringByReplacingOccurrencesOfString: [NSString stringWithFormat:@".%@", name.pathExtension] | |
withString: [NSString stringWithFormat:@"-568h@2x.%@", name.pathExtension ] ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LC_ALL='C' history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
from DictionaryServices import * | |
def main(): | |
try: | |
searchword = sys.argv[1].decode('utf-8') | |
except IndexError: | |
errmsg = 'You did not enter any terms to look up in the Dictionary.' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = JiaJi Yin | |
email = [email protected] | |
[core] | |
quotepath = false | |
editor = "emacs -nw -q --load \"~/simple.emacs.d/init.el\"" | |
texteditor = "emacs -nw -q --load \"~/simple.emacs.d/init.el\"" | |
autocrlf = input | |
pager = tig | |
[diff] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Yinjiaji's Emacs config in Mac OS X | |
;; Email: [email protected] | |
;; | |
;;Unicad | |
;;(load "~/.emacs.d/unicad.elc") | |
;;(require 'unicad) | |
;;ido-mode | |
(require 'ido) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
export DEVELOPER_DIR="/Applications/XCode.app/Contents/Developer" | |
SYMBOLICATECRASH=`find /Applications/Xcode.app -name symbolicatecrash -type f` | |
${SYMBOLICATECRASH} -v "$1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[diff] | |
tool = "twdiff" | |
[difftool] | |
prompt = false | |
[difftool "twdiff"] | |
cmd = /usr/local/bin/twdiff --wait --resume "$LOCAL" "$REMOTE" | |
[merge] | |
tool = "twdiff" | |
[mergetool] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// MyController.h | |
// | |
// Created by Ben Copsey on 20/07/2009. | |
// Copyright 2009 All-Seeing Interactive. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import <GHUnit/GHUnit.h> | |
@class ASINetworkQueue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; auto-complete-mode | |
(setq ac-modes (append ac-modes '(objc-mode))) | |
(add-to-list 'load-path (expand-file-name "~/.emacs.d/vendor")) ;; Set your own Path to auto-complete-clang.el | |
(setq ac-clang-flags (list "-D__IPHONE_OS_VERSION_MIN_REQUIRED=30200" "-x" "objective-c" "-std=gnu99" "-isysroot" xcode:sdk "-I." "-F.." "-fblocks")) | |
(require 'auto-complete-clang) | |
;; (setq ac-clang-prefix-header "stdafx.pch") | |
;; (setq ac-clang-flags '("-w" "-ferror-limit" "1")) | |
;(setq clang-completion-flags (list "-Wall" "-Wextra" "-fsyntax-only" "-ObjC" "-std=c99" "-isysroot" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk" "-I." "-F.." "-D__IPHONE_OS_VERSION_MIN_REQUIRED=30200")) | |
(add-hook 'objc-mode-hook | |
(lambda () (setq ac-sources (append '(ac-source-clang |