Skip to content

Instantly share code, notes, and snippets.

View emartynov's full-sized avatar
🐾
Hello

Eugen Martynov emartynov

🐾
Hello
View GitHub Profile
@emartynov
emartynov / build.gradle
Last active November 13, 2016 12:03
Gradle build file
apply from: 'extra/environment.gradle'
@emartynov
emartynov / .travis.yml
Last active November 12, 2016 22:32
Travis .yaml
jdk: oraclejdk8
before_script:
- export ANDROID_HOME=$HOME/.android
- mkdir -p $HOME/.android
- cp -r extra/licenses $ANDROID_HOME/licenses
- chmod +x gradlew
script:
- ./gradlew clean test

Keybase proof

I hereby claim:

  • I am emartynov on github.
  • I am eugen (https://keybase.io/eugen) on keybase.
  • I have a public key whose fingerprint is C930 5431 64D0 8903 2E83 2129 9896 55D8 BC15 51EA

To claim this, I am signing this object:

@emartynov
emartynov / Data.java
Last active January 13, 2016 14:02
ReadWrite locks
public Object read() {
synchronized(writeLock) {
synchronized(readLock) {
readersCount += 1;
}
}
final Object result = value;
synchronized(readLock) {
@emartynov
emartynov / gist:6e7f11072b1d3244a0f5
Created November 18, 2014 16:11
Issue with negative button
new MaterialDialog.Builder(this)
.title(R.string.states)
.items(R.array.states)
.itemsCallback(new MaterialDialog.ListCallback() {
@Override
public void onSelection(MaterialDialog dialog, View view, int which, String text) {
Toast.makeText(getApplicationContext(), which + ": " + text, Toast.LENGTH_SHORT).show();
}
})
.negativeText("Negative")
@emartynov
emartynov / build.gradle
Created June 23, 2014 22:25
build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.11.+'
classpath 'org.robolectric:robolectric-gradle-plugin:0.11.0'
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.10.+'
}
@emartynov
emartynov / brew.log
Created March 17, 2014 06:25
xctool install
==> Downloading https://github.com/facebook/xctool/archive/v0.1.14.tar.gz
Already downloaded: /Library/Caches/Homebrew/xctool-0.1.14.tar.gz
==> Verifying xctool-0.1.14.tar.gz checksum
tar xf /Library/Caches/Homebrew/xctool-0.1.14.tar.gz
==> ./scripts/build.sh XT_INSTALL_ROOT=/usr/local/Cellar/xctool/0.1.14/libexec
2014-03-17 07:23:47.929 xcodebuild[87842:1007] [MT] PluginLoading: Required plug-in compatibility UUID A2E4D43F-41F4-4FB9-BB94-7177011C9AED for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/SparkInspectorXcodePlugin.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2014-03-17 07:23:48.145 xcodebuild[87853:1007] [MT] PluginLoading: Required plug-in compatibility UUID A2E4D43F-41F4-4FB9-BB94-7177011C9AED for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/SparkInspectorXcodePlugin.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2014-03-17 07:23:48.352 xcodebuild[87864:1007] [MT] PluginLoading: Required plug-in compatibility UUID A
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: e25c9ec9dc72f156924e0bd2473f35c83ffe733f
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit haswell
OS X: 10.9.2-x86_64
Xcode: 5.1
CLT: 5.1.0.0.1.1393561416
Clang: 5.1 build 503
@emartynov
emartynov / pom.xml
Created April 5, 2013 15:58
Update authority for content providers
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>${android-maven-plugin.version}</version>
<configuration>
<manifest>
<providerAuthorities>
<property>
<name>com.company.android.product.provider.Provider1</name>
<value>com.company.android.${environment}</value>
@emartynov
emartynov / pom.xml
Created April 5, 2013 15:53
Point android maven plugin to custom manifest file
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>
</configuration>
</plugin>