Skip to content

Instantly share code, notes, and snippets.

View amatkivskiy's full-sized avatar
🇺🇦

Andrii Matkivskyi amatkivskiy

🇺🇦
View GitHub Profile
@brendanzagaeski
brendanzagaeski / Metadata.xml
Last active December 7, 2021 14:22
Some Metadata.xml fixes for binding the Socialize Android SDK (http://getsocialize.com/sdk/) in Xamarin.Android
<metadata>
<!-- Some Metadata.xml fixes for binding the Socialize Android SDK (http://getsocialize.com/sdk/) in Xamarin.Android
Note that this is not a complete set of fixes. These changes only address the first round of compile errors. -->
<!-- Fixes for duplicate EventArgs, as discussed on:
http://docs.xamarin.com/guides/android/advanced_topics/java_integration_overview/binding_a_java_library_(.jar)/#Problem_Duplicate_custom_EventArgs_types
Error message: Error CS0102: The type `SomeClass` already contains a definition for `p0' (CS0102) -->
<attr path="/api/package[@name='com.socialize.auth.twitter']/interface[@name='TwitterAuthListener']/method[@name='onError' and count(parameter)=1 and parameter[1][@type='com.socialize.error.SocializeException']]" name="argsType">AuthTwitterErrorEventArgs</attr>
<attr path="/api/package[@name='com.socialize.facebook']/interface[@name='Facebook.DialogListener']/method[@name='onComplete' and count(parameter)=1 and parameter[1][@type='android.os.Bundle
@JakeWharton
JakeWharton / README.md
Last active January 8, 2020 02:13
A special activity which facilitates restarting your application process.
@artem-zinnatullin
artem-zinnatullin / YourApp.java
Last active August 29, 2015 14:26
Fix for performance issue in RxJava 1.0.3+
// Issue: https://github.com/ReactiveX/RxJava/issues/3119
class YourApp extends Application {
static {
// I recommend you to put this code into static initialization block of Application class
// because Application class will be loaded before you will start doing some work via RxJava
// PLEASE add comment "remove fix from app class… when you'll switch to new version of RxJava"
// near to "compile 'io.reactivex:rxjava:1.0.13'" in your build.gradle
System.setProperty("rx.scheduler.jdk6.purge-force", "true");
import android.animation.ValueAnimator;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.view.View;
@mauron85
mauron85 / keep-adb-running.sh
Created September 22, 2016 09:55
Workaround adb disconnecting issue on macOS Sierra
#!/bin/bash
cat << EOF
###########################################################
# Workaround adb disconnecting issue on macOS Sierra
#
# More info:
# https://code.google.com/p/android/issues/detail?id=219085
# credits to: hans...@meetme.com, vs...@google.com
###########################################################
@RichardLitt
RichardLitt / deprecation-checklist.md
Created August 14, 2017 14:32
deprecation-checklist.md

How To Deprecate A Repository on GitHub

A simple checklist for deprecating a repository. See https://github.com/RichardLitt/knowledge/blob/master/how-to-deprecate-a-repository-on-github.md.

Deprecating a project no one uses

  • Change the GitHub description. This is often the first thing people see for the repository, and the first line that people will see if looking at the repository in the Organization view. The most important thing to do is to add the word DEPRECATED at the front of the description. This clearly marks it will not be updated. You can also add an emoji to it. ⛔️ DEPRECATED <former description> makes it pop out a bit more.
  • Add GitHub topics: deprecated, obselete, and archived are all good ones.
  • Edit the title of the README. Remove the current title, and instead write # DEPRECATED.
@tomaszpolanski
tomaszpolanski / logging.kt
Last active February 7, 2021 15:24
RxLogging
@file:Suppress("NOTHING_TO_INLINE")
import android.util.Log
import io.reactivex.*
inline fun <reified T> printEvent(tag: String, success: T?, error: Throwable?) =
when {
success == null && error == null -> Log.d(tag, "Complete") /* Only with Maybe */
success != null -> Log.d(tag, "Success $success")
error != null -> Log.d(tag, "Error $error")
@almozavr
almozavr / jacoco.gradle
Last active January 5, 2021 12:37
Gradle Jacoco config for Android (3.x plugin) with kotlin and custom excludes support
apply plugin: "jacoco"
jacoco {
toolVersion = deps.test.jacocoVersion
}
tasks.withType(Test) {
jacoco.includeNoLocationClasses = true
}
@kibotu
kibotu / updateLocalization.sh
Created April 16, 2018 07:00
localize.biz
#!/usr/bin/env bash
authKey="MY_LOCALIZE_BIZ_API_KEY"
valuesDir="src/main/res/values"
languages="de en"
# Main string files
for language in $languages
do
if [ "$language" == "en" ]; then
saveDir="$valuesDir"