Skip to content

Instantly share code, notes, and snippets.

View dimorinny's full-sized avatar
🐓
by chinese calendar

Dima Merkurev dimorinny

🐓
by chinese calendar
View GitHub Profile
package com.nbsp.queuer.widget;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.widget.LinearLayout;
import com.nbsp.queuer.R;
/**
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:fitsSystemWindows="true"
android:clickable="true"
android:background="?attr/colorPrimary"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<declare-styleable name="BoundedView">
<attr name="bounded_width" format="dimension" />
<attr name="bounded_height" format="dimension" />
</declare-styleable>
(test13) DBG | Matching pattern for code="ProvisioningState/succeeded"
(test13) DBG | Matching pattern for code="PowerState/running"
(test13) DBG | Power state found.
(test13) DBG | Determined Azure PowerState="running", docker-machine state="Running"
(test13) DBG | Machine IP address resolved to: 40.64.209.171
(test13) DBG | Machine URL is resolved to: tcp://40.64.209.171:2376
Reading CA certificate from /Users/Dimorinny/.docker/machine/certs/ca.pem
Reading server certificate from /Users/Dimorinny/.docker/machine/machines/test13/server.pem
Reading server key from /Users/Dimorinny/.docker/machine/machines/test13/server-key.pem
Error creating machine: Error checking the host: Error checking and/or regenerating the certs: There was an error validating certificates for host "40.68.209.171:2376": remote error: bad certificate
@dimorinny
dimorinny / GPU.md
Created March 24, 2019 22:09
Android emulator gpu utilization question

We're running a lot of emulators for testing on our CI. Right now, we're using swiftshader_inderect renderer. But we have tesla p40 on our servers and want to utilize it because CPU usage is our bottle neck.

I'm using command:

/opt/android-sdk/emulator/emulator -avd emulator_22 -sdcard /sdcard.img -verbose -gpu host -snapshot ci -no-snapshot-save -no-boot-anim -no-audio -qemu

for running gpu accelerated emulator and everething works great.

But when I tried to run a lot more emulators (about 6) I found X11 lags (about 20 FPS) and white screen of deth on 7th emulator with a lot of buffer allocations errors:

@dimorinny
dimorinny / SystemDialogsManager.kt
Created July 2, 2019 18:05
Close system dialogs
package com.avito.android.runner
import android.annotation.SuppressLint
import android.support.test.InstrumentationRegistry
import android.support.test.uiautomator.UiDevice
import android.support.test.uiautomator.UiSelector
import android.util.Log
import com.avito.android.util.getStackTraceString
/**
#!/bin/bash
set -eax
ITERATIONS=3
declare -a BLOCK_SIZE_ARR=("4K" "64K" "256K" "1M")
drop_caches() {
adb shell 'echo 3 > proc/sys/vm/drop_caches'
}