Skip to content

Instantly share code, notes, and snippets.

Nicholas Tau demonnico

Block or report user

Report or block demonnico

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
git filter-branch --env-filter '
CORRECT_NAME="Your Correct Name"
demonnico / UIDevice+Processes.m
Created Feb 27, 2015
UIDevice Category For Processes.
View UIDevice+Processes.m
// .h
@interface UIDevice (ProcessesAdditions)
- (NSArray *)runningProcesses;
// .m
#import <sys/sysctl.h>
@implementation UIDevice (ProcessesAdditions)
demonnico /
Created Aug 6, 2014
keybase identify

Keybase proof

I hereby claim:

  • I am demon1105 on github.
  • I am demonnico ( on keybase.
  • I have a public key whose fingerprint is 4F29 DF51 438E F0DA 6D12 325E A80B 7A46 78AB FAFA

To claim this, I am signing this object:

demonnico / commands.h
Created Jul 23, 2014
All useful commands
View commands.h
lipo -info hello.a // print the static library's fat info.
View gist:d67d323e0939d6970dfc
//get default metadata infomation from CMSampleBufferRef instance.
NSDictionary * dic =
(__bridge NSDictionary*)CMCopyDictionaryOfAttachments(NULL, imageDataSampleBuffer, kCMAttachmentMode_ShouldPropagate);
NSLog(@"default metadata:%@",dic);
demonnico /
Last active Aug 29, 2015
After get device's udid by udid.mobileconfig, we'd add device to profile by these steps.
/usr/libexec/PlistBuddy -c Print:UDID udid.plist
ios devices:add "name"=udid
ios profiles:devices:add profilename "name"=udid
rm -f profilename.mobileprovision
ios profiles:download profilename
demonnico / 0_reuse_code.js
Created May 28, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
demonnico / .gitignore
Created May 21, 2014
git ignore file for iOS project
View .gitignore
# Created by
### Xcode ###
demonnico /
Created May 5, 2014
Make it easy to create all the icons we needed in iOS application.
#imagemagick is needed
convert $1 -resize 29x29 Icon-Small.png
convert $1 -resize 58x58 Icon-Small@2x.png
convert $1 -resize 40x40 Icon-40.png
convert $1 -resize 80x80 Icon-40@2x.png
convert $1 -resize 57x57 Icon.png
convert $1 -resize 114x114 Icon@2x.png
convert $1 -resize 120x120 Icon-60@2x.png
convert $1 -resize 76x76 Icon-76.png
demonnico /
Last active May 5, 2019
resign ipa file
#First of all, create a new plist file named 'channnel.plist' and refer into your project.
#Second, move codes below in 'didFinishLaunchingWithOptions'
#NSString * channelPath = [[NSBundle mainBundle] pathForResource:@"channel" ofType:@"plist"];
#NSDictionary*channelDic= [NSDictionary dictionaryWithContentsOfFile:channelPath];
#NSString * channelIdentify = [channelDic objectForKey:@"channel"];
#[MobClick startWithAppkey:UMENG_KEY reportPolicy:BATCH channelId:channelIdentify];
#last step, 'cd' into the folder where xxx.ipa is there.
#generally, it's the name of scheme
You can’t perform that action at this time.