This file contains hidden or 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
/** Copyright 2017, Oleksandr Kucherenko */ | |
package olku.android.mvp; | |
import android.net.Uri; | |
import android.os.Bundle; | |
import android.support.annotation.*; | |
import java.lang.annotation.Retention; | |
import java.util.HashMap; | |
import java.util.Map; |
This file contains hidden or 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.name; | |
import android.annotation.TargetApi; | |
import android.app.Activity; | |
import android.app.Application; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.res.Resources; | |
import android.os.Build; | |
import android.os.Bundle; |
This file contains hidden or 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
local list = KEYS[1] | |
local search = KEYS[2] | |
local instances = redis.call('KEYS', search) | |
if nil == instances then return nil end | |
redis.call('DEL', list) | |
local counter = 0 | |
for i,instance in ipairs(instances) do | |
redis.call('LPUSH', list, instance) | |
counter = counter + 1 |
This file contains hidden or 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
local list = KEYS[1] | |
local user = KEYS[2] | |
local instance = redis.call('RPOPLPUSH', list, list) | |
if nil == instance then return nil end | |
local first = instance | |
while true do | |
local id = string.sub(tostring(instance), string.len('instance.') + 1) | |
local reserved = 'reserved.' .. id | |
local confirmed = redis.call('SET', reserved, user, 'EX', 2400, 'NX') |
This file contains hidden or 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
call :convert "02. Pup Pup Boogie + Pups in a Fog.mkv" | |
exit 0 | |
:convert | |
SET VIDEO=%~1 | |
SET IN_FOLDER=C:\Users\alexk\Downloads\PAW.Patrol.S01.720p.WEB-DL | |
SET OUT_FOLDER=D:\downloads\paw-patrol | |
ffmpeg ^ | |
-i "%IN_FOLDER%\%VIDEO%" ^ |
This file contains hidden or 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
/** Author: Oleksandr Kucherenko, 2018-present */ | |
package {your.package.name}; | |
import android.annotation.TargetApi; | |
import android.app.Activity; | |
import android.content.res.Resources; | |
import android.graphics.Matrix; | |
import android.os.Build; | |
import android.support.annotation.NonNull; | |
import android.support.v4.util.Pair; |
This file contains hidden or 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
// Author: Oleksandr Kucherenko, 2016-present | |
package your.package.android.utils; | |
import android.annotation.SuppressLint; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.graphics.Point; | |
import android.graphics.Rect; | |
import android.graphics.drawable.ColorDrawable; | |
import android.os.Build; |
This file contains hidden or 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
static isAnyDeviceOnline() { | |
def start = System.currentTimeMillis() | |
def firstTime = true | |
while (System.currentTimeMillis() - start < 10000) { | |
def out = new StringBuilder() | |
def process = 'adb devices -l'.execute() | |
process.consumeProcessOutput(out, null) | |
process.waitForOrKill(1000) |
This file contains hidden or 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
# fix android sdk licenses | |
- mkdir "$ANDROID_HOME/licenses" || true | |
- echo -e "\ncf461b4a7cc1448899002f845b02532d01783529" > "$ANDROID_HOME/licenses/android-sdk-license" | |
- echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" >> "$ANDROID_HOME/licenses/android-sdk-license" | |
- echo -e "\n504667f4c0de7af1a06de9f4b1727b84351f2910" > "$ANDROID_HOME/licenses/android-sdk-preview-license" | |
- echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" >> "$ANDROID_HOME/licenses/android-sdk-preview-license" | |
- echo -e "\nd975f751698a77b662f1254ddbeed3901e976f5a" > "$ANDROID_HOME/licenses/intel-android-extra-license" | |
# show default install SDK components | |
- android-sdk-linux/tools/bin/sdkmanager - list | |
# update installation from CANNERY channel |
This file contains hidden or 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
# Moshi | |
-dontwarn okio.** | |
-dontwarn javax.annotation.Nullable | |
-dontwarn javax.annotation.ParametersAreNonnullByDefault | |
-keepclasseswithmembers class * { | |
@com.squareup.moshi.* <methods>; | |
} |