Skip to content

Instantly share code, notes, and snippets.

@And93
And93 / clean_code.md
Created October 14, 2024 19:55 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@And93
And93 / emulator-install-using-avdmanager.md
Created January 29, 2024 16:39 — forked from mrk-han/emulator-install-using-avdmanager.md
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architecture (for an M1/M2 Macbook):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-30;google_atd;arm64-v8a"

@And93
And93 / AdbCommands
Created January 18, 2024 15:19 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@And93
And93 / override_click.ts
Created March 31, 2021 11:21 — forked from Xotabu4/index.d.ts
Adding waits into webdriverio clicks
/**
* Override original WDIO click, with automatic wait, scrolling, and retrying logic.
* $(...).click()
*/
browser.overwriteCommand(
'click',
function (originalClick, options: WebdriverIO.ClickOptions = { waitOptions: {} }) {
const {
retries = 2,
scroll = true,
@And93
And93 / server.js
Created December 2, 2019 19:32 — forked from ball6847/server.js
Chrome Headless SSR for Old School
const puppeteer = require('puppeteer')
const express = require('express')
const app = express()
// page with angularjs application
const url = 'http://ng-seo.sourcelab.xyz/'
app.get('/', async function (req, res) {
const browser = await puppeteer.launch()
const page = await browser.newPage()
// This injects a box into the page that moves with the mouse;
// Useful for debugging
async function installMouseHelper(page) {
await page.evaluateOnNewDocument(() => {
// Install mouse helper only for top-level frame.
if (window !== window.parent)
return;
window.addEventListener('DOMContentLoaded', () => {
const box = document.createElement('puppeteer-mouse-pointer');
const styleElement = document.createElement('style');
@And93
And93 / accountProviderService.js
Created May 16, 2019 12:06 — forked from Xotabu4/accountProviderService.js
Little nodejs http server for serving users to protractor parallel runs, so each thread will get unique user.
/**
* Created by akhotemskyi on 8/18/16.
*/
const request = require('request');
let http = require('http');
let accounts;
let server;
/**
* Accepts array of object with users, that should be served thru HTTP server.
@And93
And93 / gist:6bf677069674c62e7846eb0045479e4d
Created September 4, 2018 19:18 — forked from DimitryRd/gist:a8aa04bfac87129376cddb27511d49a0
Reporter for collection of response logs with logCorrelationId from network console of the browser
let networkLogsMessagesArray = [];
jasmine
.getEnv()
.afterEach(async () => {
/**
* Collects response logs with logCorrelationId from network console for all not-disabled tests
*/
const networkLogs = await browser.manage().logs().get('performance');