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
100% — FF | |
95% — F2 | |
90% — E6 | |
85% — D9 | |
80% — CC | |
75% — BF | |
70% — B3 | |
65% — A6 | |
60% — 99 | |
55% — 8C |
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 | |
trap ' ' INT | |
file="/home/maksym/Desktop/$(date +%s).gif" | |
printf 'recording\n' | |
adb shell screenrecord /sdcard/video.mp4 | |
printf '\033[10D' | |
printf '\033[2K' | |
sleep .5 | |
printf 'downloading\n' | |
adb pull /sdcard/video.mp4 . > /dev/null |
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 | |
file="/home/maksym/Desktop/$(date +%s).png" | |
adb exec-out screencap -p > $file |
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 | |
SWITCH_BRANCH_FLAG=$3 | |
if [ $SWITCH_BRANCH_FLAG = "1" ] ; then | |
CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" | |
case $CURRENT_BRANCH in | |
feature*) | |
NEW_BRANCH=${CURRENT_BRANCH/feature/_dev} | |
git branch -m $CURRENT_BRANCH $NEW_BRANCH |
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 | |
COMMIT_FILE=$1 | |
COMMIT_SOURCE=$2 | |
GIT_DIR=$(git rev-parse --git-dir) | |
COMMIT_MESSAGE=$(cat $COMMIT_FILE) | |
TICKET=$(cat $GIT_DIR/ticket) | |
if [[ -n "$TICKET" && "$COMMIT_SOURCE" != "merge" ]]; then | |
grep -qs "$TICKET:" "$COMMIT_FILE" || echo "$TICKET: $COMMIT_MESSAGE" > $COMMIT_FILE |
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
import dmax.dsl.logger.Logger.log | |
import dmax.dsl.logger.Level | |
import dmax.dsl.logger.LogWriter | |
import dmax.dsl.logger.AndroidLogWriter | |
import dmax.dsl.logger.Sfl4jLogWriter | |
import dmax.dsl.logger.Logger.registerWriter |
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
<dependency> | |
<groupId>dmax.dsl</groupId> | |
<artifactId>logger</artifactId> | |
<version>0.1</version> | |
</dependency> | |
<dependency> | |
<groupId>dmax.dsl</groupId> | |
<artifactId>logger-android</artifactId> | |
<version>0.1</version> |
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
repositories { | |
jcenter() | |
} | |
dependencies { | |
compile "dmax.dsl:logger:0.1" | |
compile "dmax.dsl:logger-android:0.1@aar" | |
compile "dmax.dsl:logger-slf4j:0.1" | |
} |
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
@Test | |
fun `test scenario dsl example`() = scenario { | |
var socket: WebSocket? = null | |
define { | |
`return mock socket when call factory`() | |
} | |
act { | |
socket = mockWebSocketFactory.invoke() | |
`do something important`() | |
} |
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
log { | |
level { WARNING } | |
tag { "MainActivity" } | |
message { "Something went wrong" } | |
} | |
log { | |
throwable { | |
UnsupportedOperationException() | |
} |
NewerOlder