This file contains 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
# core {{{ | |
[core] | |
excludesfile = /Users/almozavr/.gitignore_global | |
pager=less -x4 | |
quotepath = false | |
pager = less | |
autocrlf = input | |
#}}} | |
# user {{{ |
This file contains 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/bash | |
#=====EXAMPLE OF USAGE=============== | |
# $ ./scripts/gm.sh -r 526d4be6-9964-4a84-83fd-31af8029cf44 | |
# $ ./gradlew clean connectedAndroidTest | |
# $ ./scripts/gm.sh -s 526d4be6-9964-4a84-83fd-31af8029cf44 | |
#==================================== | |
#=========== | |
# VM helpers |
This file contains 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
# core {{{ | |
[core] | |
excludesfile = ~/.gitignore_global | |
pager=less -x4 | |
quotepath = false | |
pager = less | |
autocrlf = input | |
#}}} | |
# user {{{ |
This file contains 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
private static WeakReference<RenderScript> rsRef = new WeakReference<>(null); | |
private static WeakReference<ScriptIntrinsicBlur> blurScriptRef = new WeakReference<>(null); | |
/** | |
* Use {@link RenderScript} to blur bitmap. | |
* | |
* @param bitmap to be blurred | |
* @param radius of blur | |
* @throws RSRuntimeException when some .so libs are not available (e.g. on Genymotion emulator) | |
*/ |
This file contains 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 | |
# Script for getting database form device via adb and open in sqlite_client(work with not rooted devices) | |
# | |
# While you aren't breaking script execution(CTLR+C), | |
# each closing of sqlite_client will be download and open database again and again. | |
# | |
# Note: if you don't have installed sqliteman override sqlite_client variable with your favorite client | |
# | |
# Usage: open_db.sh {app_package} {db_name} {app} |
This file contains 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
public class PositionResizeAnimator { | |
public static Animator createAnimator(Holder srcHolder, Holder targetHolder, final View animateView) { | |
ValueAnimator heightAnimator = ValueAnimator.ofInt(srcHolder.height, targetHolder.height); | |
heightAnimator.addUpdateListener( | |
new ValueAnimator.AnimatorUpdateListener() { | |
@Override | |
public void onAnimationUpdate(ValueAnimator animation) { | |
int val = (Integer) animation.getAnimatedValue(); | |
ViewGroup.LayoutParams layoutParams = animateView.getLayoutParams(); |
This file contains 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
package your.package; | |
import android.graphics.Bitmap; | |
import android.graphics.drawable.BitmapDrawable; | |
import android.support.annotation.NonNull; | |
import android.widget.ImageView; | |
public abstract class AndroidPaletteCallback extends PaletteCallback<ImageView> { | |
public AndroidPaletteCallback(@NonNull ImageView imageView) { |
This file contains 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
angular.module("services").factory('ModalUrl', [ | |
'$rootScope', '$modal', '$location', '$routeParams', '$window', '$timeout', | |
($rootScope, $modal, $location, $routeParams, $window, $timeout) -> | |
modalInstance = null | |
checkModal = () -> | |
modalParam = decodeURIComponent($routeParams.modal) | |
if (modalParam != 'undefined') | |
optionsParam = decodeURIComponent($routeParams.options) | |
if (optionsParam != 'undefined') | |
options = JSON.parse(optionsParam) |
This file contains 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
public static Intent newSmsIntent(Context context, String body, String... phoneNumber) { | |
Uri smsUri; | |
if (phoneNumber == null) { | |
smsUri = Uri.parse("smsto:"); | |
} else { | |
smsUri = Uri.parse("smsto:" + Uri.encode(TextUtils.join(",", phoneNumber))); | |
} | |
Intent intent; | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { | |
intent = new Intent(Intent.ACTION_SENDTO, smsUri); |
This file contains 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
public List<Class<?>> getEventTypesBySubscriber(Object subscriber) { | |
List<SubscriberMethod> subscriberMethods = subscriberMethodFinder.findSubscriberMethods(subscriber.getClass(), defaultMethodName); | |
List<Class<?>> eventTypes = new ArrayList<Class<?>>(subscriberMethods.size()); | |
for (SubscriberMethod method : subscriberMethods) { | |
eventTypes.add(method.eventType); | |
} | |
return eventTypes; | |
} |
OlderNewer