Skip to content

Instantly share code, notes, and snippets.

View liuxuan30's full-sized avatar

Xuan liuxuan30

View GitHub Profile
@liuxuan30
liuxuan30 / yalu
Created May 23, 2018 06:37
yalu-life
2018-05-23 14:34:50.976011 UnityAdsExample[13320:4184102] ---- ctor before init printing pools----
objc[13320]: ##############
objc[13320]: AUTORELEASE POOLS for thread 0x1a8936c40
objc[13320]: 20 releases pending.
objc[13320]: [0x1005d4000] ................ PAGE (hot) (cold)
objc[13320]: [0x1005d4038] 0x174261dc0 __NSBundleTables
objc[13320]: [0x1005d4040] 0x17419f960 NSPathStore2
objc[13320]: [0x1005d4048] 0x174261dc0 __NSBundleTables
objc[13320]: [0x1005d4050] 0x174261dc0 __NSBundleTables
objc[13320]: [0x1005d4058] 0x1740c7700 __NSCFString
@liuxuan30
liuxuan30 / electra
Created May 23, 2018 06:37
electra-life
2018-05-23 14:32:30.686295+0800 UnityAdsExample[5247:434469] ---- ctor before init printing pools----
objc[5247]: ##############
objc[5247]: AUTORELEASE POOLS for thread 0x1b2182b80
objc[5247]: 66 releases pending.
objc[5247]: [0x102adc000] ................ PAGE (hot) (cold)
objc[5247]: [0x102adc038] ################ POOL 0x102adc038
objc[5247]: [0x102adc040] 0x1c007eb40 __NSBundleTables
objc[5247]: [0x102adc048] 0x1c0183670 NSPathStore2
objc[5247]: [0x102adc050] 0x1c007eb40 __NSBundleTables
objc[5247]: [0x102adc058] 0x1c007eb40 __NSBundleTables
@liuxuan30
liuxuan30 / electraApplicationDidLaunch
Created May 22, 2018 08:42
electraApplicationDidLaunch
2018-05-22 16:41:25.877107+0800 UnityAdsExample[4338:223158] ---- applicationDidLaunch printing pools----
objc[4338]: ##############
objc[4338]: AUTORELEASE POOLS for thread 0x1b2182b80
objc[4338]: 3359 releases pending.
objc[4338]: [0x104b48000] ................ PAGE (full) (cold)
objc[4338]: [0x104b48038] ################ POOL 0x104b48038
objc[4338]: [0x104b48040] 0x1c00287e0 __NSCFString
objc[4338]: [0x104b48048] ################ POOL 0x104b48048
objc[4338]: [0x104b48050] ################ POOL 0x104b48050
objc[4338]: [0x104b48058] 0x1c404be50 __NSCFString
@liuxuan30
liuxuan30 / yaluApplicationDidLaunch
Created May 22, 2018 08:36
yaluApplicationDidLaunch
2018-05-22 16:33:49.569012 UnityAdsExample[12905:4144013] ---- applicationDidLaunch printing pools----
objc[12905]: ##############
objc[12905]: AUTORELEASE POOLS for thread 0x1a8936c40
objc[12905]: 9466 releases pending.
objc[12905]: [0x100120000] ................ PAGE (full) (cold)
objc[12905]: [0x100120038] 0x17006c740 __NSBundleTables
objc[12905]: [0x100120040] 0x17019bfb0 NSPathStore2
objc[12905]: [0x100120048] 0x17006c740 __NSBundleTables
objc[12905]: [0x100120050] 0x17006c740 __NSBundleTables
objc[12905]: [0x100120058] 0x1700cff10 __NSCFString
2018-05-22 08:12:59.567678 UnityAdsExample[12621:4121068] ---- printing pools----
objc[12621]: ##############
objc[12621]: AUTORELEASE POOLS for thread 0x1a8936c40
objc[12621]: 97 releases pending.
objc[12621]: [0x100428000] ................ PAGE (hot) (cold)
objc[12621]: [0x100428038] 0x17006f600 __NSBundleTables
objc[12621]: [0x100428040] 0x170186730 NSPathStore2
objc[12621]: [0x100428048] 0x17006f600 __NSBundleTables
objc[12621]: [0x100428050] 0x17006f600 __NSBundleTables
objc[12621]: [0x100428058] 0x1700dfcd0 __NSCFString
@liuxuan30
liuxuan30 / Electra pools
Created May 22, 2018 00:11
Electra pools
2018-05-22 08:09:50.391926+0800 UnityAdsExample[1463:121474] ---- printing pools----
objc[1463]: ##############
objc[1463]: AUTORELEASE POOLS for thread 0x1b2182b80
objc[1463]: 52 releases pending.
objc[1463]: [0x104870000] ................ PAGE (hot) (cold)
objc[1463]: [0x104870038] ################ POOL 0x104870038
objc[1463]: [0x104870040] 0x1c0072440 __NSBundleTables
objc[1463]: [0x104870048] 0x1c019a5b0 NSPathStore2
objc[1463]: [0x104870050] 0x1c0072440 __NSBundleTables
objc[1463]: [0x104870058] 0x1c0072440 __NSBundleTables
@liuxuan30
liuxuan30 / InteractiveTransitionTableViewDeselection.m
Created December 25, 2017 00:19 — forked from smileyborg/InteractiveTransitionCollectionViewDeselection.m
Animate table view deselection alongside interactive transition on iOS 11
/*
In iOS 11, interactive view controller transitions no longer scrub by setting the layer speed to zero
and changing the timeOffset. As a result of this change, implicit animations that occur in places like
-viewWillAppear: (called during an interactive transition) no longer end up “caught in” the animation.
To get the same behavior for table view row deselection as before, you can either use UITableViewController
which implements this for you, or you can implement it manually by deselecting the row in an alongside
animation for the transition (set up in -viewWillAppear: using the transition coordinator).
Here is an example implementation which correctly handles some of the more subtle corner cases:
@liuxuan30
liuxuan30 / test.md
Last active August 1, 2017 11:38
Test article
- (void)startMonitor {
    NSLog(@"Start monitor");
    [[NSOperationQueue new]addOperationWithBlock:^{
        NSMachPort *port = [NSMachPort new];
        NSRunLoop *runloop = [NSRunLoop currentRunLoop];
        [runloop addPort:port forMode:NSRunLoopCommonModes];
        while (true) {
            [self monitorSyslog];
 [self monitorNetwork];