Skip to content

Instantly share code, notes, and snippets.

@kinkoi
kinkoi / gist:4edc3bbdf3217d23ae9d8582eba04d40
Last active October 2, 2017 16:06
Android Emulator Cheat Sheet
Opt+long press(click) to multi select pictures
cmd+shift+p
@kinkoi
kinkoi / android debugging
Created September 21, 2017 18:26
Android Debugging
See the activity stack: shell dumpsys activity
It turns out that FIRDataSnapshot "value" property sometimes returns NSString when it actually contains a large integer number (for example 1479806717404). so ingestion time was NSSTring instead of NSNumber
and when isEqualToNumber is called on NSStirng you get crash isEqualToNumber is called as a part of isEqual message in
@kinkoi
kinkoi / gist:31e3f5bb1c91bd15095686627373ec14
Created August 24, 2016 17:13
Custom LayoutInflater Factories
LayoutInflater layoutInflater = LayoutInflater.from(getContext()).cloneInContext(getContext());
LayoutInflaterCompat.setFactory(layoutInflater, new CustomLayoutInflaterFactory());
layoutInflater.inflate(R.layout.input_tool_bar, this);
./gradlew assembleRelease -Pandroid.injected.signing.store.file=$KEYFILE -Pandroid.injected.signing.store.password=$STORE_PASSWORD -Pandroid.injected.signing.key.alias=$KEY_ALIAS -Pandroid.injected.signing.key.password=$KEY_PASSWORD
@kinkoi
kinkoi / gist:85e7b53fdc1c6e22397d
Last active October 4, 2022 14:07
Xcode Useful LLDB commands
po [[UIApp keyWindow] recursiveDescription]
expr (void)[0x14b98920 setFrame:CGRectMake(70,40,150,25)]
po (void)[0x7852560 setClipsToBounds:NO]
po (void)[0x7852560 setFrame:(CGRect) { 13, 248, 295, 184 + 20 }]
po [0x7852560 setFrame:(CGRect) { 13, 248, 295, 184 + 37 }]
po (CGRect)[0x7852560 frame]
po (int)[ids count]
@kinkoi
kinkoi / iOSAutoLayoutDebug
Created February 26, 2016 23:21 — forked from xNekOIx/iOSAutoLayoutDebug
iOS AutoLayout debug
po [[UIWindow keyWindow] _autolayoutTrace] // prints layouts ambiguity
po [view constraintsAffectingLayoutForAxis:0] // horizontal
po [view constraintsAffectingLayoutForAxis:1] // vertical
[view hasAmbiguousLayout] // BOOL
[view exerciseAmbiguityInLayout] // visualizing ambiguity
UIViewAlertForUnsatisfiableConstraints // symbolic breakpoint
expr (void)[CATransaction flush]