Skip to content

Instantly share code, notes, and snippets.

View chenshengzhi's full-sized avatar

Shengzhi.Chen chenshengzhi

  • Xiamen, Fujian, China
View GitHub Profile
View MHGSwipeNavigationController.h
// MHGSwipeNavigationController.h
// SwipeNavigationController
// Created by 缪和光 on 28/12/2013.
// Copyright (c) 2013 Hokuang. All rights reserved.
#import <UIKit/UIKit.h>
View gist:4681726
expr -- (void)printf("[%s %s]\n",(char *) object_getClassName(*(long*)($rdi)), (char *)($rsi))
fbeeper / easyiosapps
Created September 15, 2014 17:30
Finally! Here's the easy access to your iOS8 simulator apps you've been looking for :)
View easyiosapps
# Using the information available in the new iOS8 simulator for each
# device/runtime (device.plist), this script creates a readable folder structure
# (no UDIDs, just simple device/runtime names). Inside that structure it creates
# soft links to your apps in development.
# You can run this script every time you install an app to your simulator, or
# you can simply call it to access this folder making sure it will always be
# updated :)
cyndibaby905 / NSNUll+ InternalNullExtention.m
Created March 28, 2014 09:23
NSNUll+ InternalNullExtention.m
View NSNUll+ InternalNullExtention.m
#define NSNullObjects @[@"",@0,@{},@[]]
@interface NSNull (InternalNullExtention)
@implementation NSNull (InternalNullExtention)
krzysztofzablocki / gist:4396302
Last active November 24, 2021 19:17
Set symbol breakpoint on objc_msgSend then setup this debug command to log all methods called in iOS Simulator. If you want to do device debugging change esp+4 register to r0, esp+8 to r1 Found long ago somewhere on stackoverflow.
View gist:4396302
expr -- (void)printf("[%s, %s]\n",(char *) object_getClassName(*(long*)($esp+4)), (char *) *(long *)($esp+8) )
Ashton-W / Breakpoints_v2.xcbkptlist
Last active January 25, 2023 09:28
My User Breakpoints_v2.xcbkptlist
View Breakpoints_v2.xcbkptlist
<?xml version="1.0" encoding="UTF-8"?>
type = "2"
version = "2.0">
<!-- All Exceptions -->
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
jspahrsummers / GHRunLoopWatchdog.h
Created January 28, 2015 20:50
A class for logging excessive blocking on the main thread
View GHRunLoopWatchdog.h
/// Observes a run loop to detect any stalling or blocking that occurs.
/// This class is thread-safe.
@interface GHRunLoopWatchdog : NSObject
/// Initializes the receiver to watch the specified run loop, using a default
/// stalling threshold.
- (id)initWithRunLoop:(CFRunLoopRef)runLoop;
/// Initializes the receiver to detect when the specified run loop blocks for
nuxlli /
Created September 9, 2011 18:51 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts
jdkanani / notepad.html
Last active July 28, 2023 15:03 — forked from jakeonrails/Ruby Notepad Bookmarklet
This bookmarklet gives you a code editor in your browser with a single click.
View notepad.html
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`
anonymous /
Created July 16, 2016 04:04
# Compile-Freetype-For-iOS
# Original Script
# Revised by: l'L'l
# New Features Include: auto download latest version, fixed toolchain locations, other various tweeks
# The MIT License (MIT)
# Copyright (c) 2016 l'L'l