Skip to content

Instantly share code, notes, and snippets.

View artsok's full-sized avatar

Artem Sokovets artsok

  • Emirates Airline/ex. Sberbank Technologies JSC.
  • Dubai
View GitHub Profile
@artsok
artsok / kubernetes_and_docker_install_xenial.sh
Created December 25, 2018 20:41 — forked from heckj/kubernetes_and_docker_install_xenial.sh
Install Docker 1.12.6 on Ubuntu Xenial 16.04.4 x64
# Install Docker on Xenial 16.04.1 x64
# Ref https://docs.docker.com/engine/installation/linux/ubuntulinux/
# No interactive for now.
export DEBIAN_FRONTEND=noninteractive
# Update your APT package index.
sudo apt-get -y update
# Update package information, ensure that APT works with the https method, and that CA certificates are installed.
sudo apt-get -y install apt-transport-https ca-certificates
# Add the new GPG key.
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
@artsok
artsok / moon-windows-image.txt
Last active December 7, 2021 17:33
Moon - Windows Image
If you have your local company image (*.img) and you want to make qemu snapshot from it, follow next steps:
For example, let's say we have image: as-win7-v33-1.img
1. Create shapshot
qemu-img create -b as-win7-v33-1.img -f qcow2 snapshot.img
2. Load and save state to snapshot. Image (as-win7-v33-1.img) located at the same path as snapshot.img. Don't forget to change SCREEN RESOLUTION in snapshot.
qemu-system-x86_64 -machine q35 -smp sockets=1,cores=2,threads=2 -m 2048 -usb -device usb-tablet -enable-kvm -net nic,model=virtio -net user,hostfwd=tcp::4444-:4444,hostfwd=tcp::8080-:8080 -drive file=snapshot.img,media=disk,snapshot=off,format=qcow2,if=virtio -rtc base=localtime -monitor stdio
@artsok
artsok / download chrome and ie drivers
Created July 30, 2019 13:05
Download necessary drivers for chrome and IE browsers.
#!/bin/bash
echo -e "For what browser download drivers?\\n 1.chrome\n 2.IE"
read -e browser
echo "You chose $browser"
case $browser in
1|chrome)
@artsok
artsok / reportportal_docker_save
Last active August 30, 2019 16:07
save reportportal docker images to localhost
#!/bin/bash
declare -a arr=("consul" "service-authorization" "traefik" "service-index" "service-api" "service-ui" "elasticsearch-oss" "service-analyzer" "service-jira" "service-rally")
for name in "${arr[@]}"
do
imagesName=($(docker images | grep $name | awk '{print $1}'))
tag=($(docker images | grep $name | awk '{print $2}'))
imagesId=($(docker images | grep $name | awk '{print $3}'))
@artsok
artsok / influxdb.md
Created September 29, 2019 13:12 — forked from dariubs/influxdb.md
influxdb cheatsheet
@artsok
artsok / duplication_of_elements.java
Last active October 13, 2019 08:03
duplication of elements
public class MainPage {
@FindBy(xpath = ".//div[@class = 'header']")
private Header header;
}
public class AnyOtherPage {
@FindBy(xpath = ".//div[@class = 'header']")
private Header header;
}
@artsok
artsok / no_parameterization_for_elements.java
Last active October 13, 2019 08:02
No parameterization for elements
public class EditUserPage {
@FindBy(xpath = "//div[text()='Sing In']")
private Button activity;
@FindBy(xpath = "//div[text()='Sign Up']")
private Button reason;
}
@artsok
artsok / boilerplate_code.java
Last active October 13, 2019 08:09
Boilerplate code
public class UserPage {
@FindBy(xpath = "//div[text()='Телефон']/input")
private TextInput innerPhone;
@FindBy(xpath = "//div[text()='Email']/input")
private TextInput email;
@FindBy(xpath = "//button[text()='Сохранить']")
private Button save;
@artsok
artsok / huge_step_class.java
Last active October 13, 2019 07:58
Huge step class
public class MainSteps {
public void hasText(HtmlElement e, Matcher m)
public void hasValue(HtmlElement e, Matcher m)
public void linkContains(HtmlElement e, String s)
public void hasSize(List<HtmlElement> e, Matcher m)
public void hasItem(List<HtmlElement> e, Matcher m)
//...
}
@artsok
artsok / a.java
Last active October 13, 2019 08:22
public interface MainPage extends WebPage, WithHeader {
@FindBy("//a[contains(text(), 'Or start a free)]")
AtlasWebElement trial();
}