Skip to content

Instantly share code, notes, and snippets.

View QAutomatron's full-sized avatar

Evgenii Skiridov QAutomatron

View GitHub Profile
@QAutomatron
QAutomatron / connect-docker.sh
Last active September 22, 2021 12:25
Start Android emulator farm
#!/bin/bash
for i in {10..60}; do adb connect 172.17.0.1:56$i; done
@QAutomatron
QAutomatron / gist:503f54d9e1b50a4300335ebef993d1d2
Created November 12, 2018 08:24
Remove untracked files in git
git rm -r --cached .
git add .
git commit -m "fixed untracked files"
AvdId=n5x_26_test
PlayStore.enabled=false
abi.type=x86
avd.ini.displayname=n5x_26_test
avd.ini.encoding=UTF-8
disk.dataPartition.size=2G
fastboot.forceColdBoot=no
hw.accelerometer=yes
hw.arc=false
hw.audioInput=yes
@QAutomatron
QAutomatron / downloader.sh
Created April 27, 2017 15:23
Download apk from hockey app. need jq installed
#!/bin/bash
BUILD=$1
TOKEN=<hockey-app-token>
APP=<app-id>
VERSION=$(curl \
-H "X-HockeyAppToken: $TOKEN" \
https://rink.hockeyapp.net/api/2/apps/$APP/app_versions \
| jq --arg BUILD "$BUILD" '.app_versions | .[] | select(.version==$BUILD) | .id')
curl -L -o $BUILD.apk https://rink.hockeyapp.net/api/2/apps/$APP/app_versions/$VERSION?format=apk
@QAutomatron
QAutomatron / xcdriver_update.sh
Created March 30, 2017 21:10
Update appium-xcuitest-driver on Mac
#!/bin/bash
cd /usr/local/lib/node_modules/appium/
npm install appium-xcuitest-driver
cd /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
mkdir -p Resources/WebDriverAgent.bundle
sh ./Scripts/bootstrap.sh -d
@QAutomatron
QAutomatron / download_ci.sh
Last active July 25, 2017 17:09
Download ipa from Circle CI
#
$TEAM = yourTeam
$REPO = yourRepo
$BUILD = yourBuildNumber
$CI_TOKEN = yourCIToken
echo "Will download app from CI"
rm -f *.ipa
curl https://circleci.com/api/v1/project/$TEAM/$REPO/$BUILD/artifacts?circle-token=$CI_TOKEN \
| egrep -o "$GREP" \
docker ps -q -f name=node | while read line ; do docker exec $line date ; done
@QAutomatron
QAutomatron / browser_start_time.sh
Last active August 1, 2016 07:58
Calculate average time for browser start at selenium nodes in docker containers filtered by name
#!/bin/bash
REGEX_URL="\[get\: https://mail.ru/"
container_time() {
# echo "Looking in: $OUTPUT"
readarray -t array <<< "$(docker logs "$1" | egrep " INFO - (Executing|Done)\: $REGEX_URL"))"
seconds_total=0
i=0
@QAutomatron
QAutomatron / docker-compose.yml
Created July 4, 2016 13:00
Compose file for two pairs of selenium grid hud and selenium node
version: '2'
services:
hub1:
image: <hub-image>
restart: always
ports:
- "4441:4444"
environment:
- JAVA_OPTS=-Xmx512m
- GRID_NEW_SESSION_WAIT_TIMEOUT = 10000
@QAutomatron
QAutomatron / crontab
Created July 4, 2016 12:57
Kill old chromedriver, chrome. Older than 10 min
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command