Skip to content

Instantly share code, notes, and snippets.

View ygerasimov's full-sized avatar

Yuriy Gerasimov ygerasimov

View GitHub Profile
@ygerasimov
ygerasimov / runCheck.sh
Created April 21, 2020 13:46
Diffy bitbucket compare script
#!/usr/bin/env bash
echo "==================================================="
echo "========== Run diffy compare and Bitbucket check =="
echo "==================================================="
API_KEY="$1"
PROJECT_ID=1194
DIFFY_HOST="https://app.diffy.website"
@ygerasimov
ygerasimov / bitbucket-pipelines.yml
Created April 21, 2020 13:44
Diffy Bitbucket integration pipeline
image: php:7.1.1
pipelines:
default:
- step:
name: Diffy check
max-time: 10 #minutes
caches:
- composer
script:
- apt-get update && apt-get install -y unzip
{#
/**
* @file
* Theme override for a breadcrumb trail.
*
* Available variables:
* - breadcrumb: Breadcrumb trail items.
*/
#}
@ygerasimov
ygerasimov / css_regression_testing.md
Created January 28, 2020 23:20 — forked from cvrebert/css_regression_testing.md
Survey of screenshot-based CSS testing tools

Currently considering https://github.com/webdriverio/webdrivercss


Core Goals:

  • Can test in up-to-date versions of all major browsers
  • Can test on up-to-date versions of all major OSes
  • Can test in IE9 (because Bootstrap v4 will support IE9+)
  • Don't want to have to setup/maintain our own cluster of VMs running all the necessary OSes (and all the versions of Windows)
  • Workflow for management of reference/baseline/norm screenshots
@ygerasimov
ygerasimov / AuthCommand.php
Created January 15, 2020 19:19
Diffy CLI auth:login command
<?php
namespace DiffyCli\Commands;
use Diffy\Diffy;
use DiffyCli\Config;
class AuthCommand extends \Robo\Tasks
{
/**
@ygerasimov
ygerasimov / OrderAddressLabelsTest.php
Created December 3, 2019 16:32
Attempt to have a BrowserTest based on installing a profile from existing configuration
<?php
namespace Drupal\Tests\mymodule_core\Unit;
use CommerceGuys\Addressing\AddressFormat\AddressFormatRepository;
use Drupal\Core\Config\FileStorage;
use Drupal\Core\Database\Database;
use Drupal\Core\DrupalKernel;
use Drupal\Core\Installer\Form\SelectProfileForm;
use Drupal\Core\Site\Settings;
@ygerasimov
ygerasimov / .platform.app.yaml
Last active June 18, 2019 00:22
Umami Diffy Platform.sh triggering hooks.
hooks:
# The deploy hook runs after your application has been deployed and started.
deploy: |
cd web
drush si demo_umami -y --account-pass=nKraDzZq8ZUq747Bn9PaXAB83 --account-mail="gareth@fivemilemedia.co.uk"
drush cron
drush status > sites/default/files/drush-status.txt
php ../scripts/diffy-visual-testing.php
@ygerasimov
ygerasimov / patches.json
Created June 13, 2019 23:36
Umami distro composer.json patches section.
"patches": {
"drupal/core": {
"Fix styling of Umami for layout builder": "https://www.drupal.org/files/issues/2019-04-24/ootb-layout-builder-buttons-checkbox-3044366-38.patch"
}
}
@ygerasimov
ygerasimov / diffy-authentication.sh
Created August 1, 2018 03:15
Get started with Diffy API's
#!/bin/bash
TOKEN=`curl -sS -X POST -H "Content-Type: application/x-www-form-urlencoded" -d "_username=ENCODEDEMAIL%40gmail.com&_password=ENCODEDPASSWORD" https://diffy.website/api/login_check | grep -o "token\":.*\"}" | sed "s/token\":\"//g" | sed "s/\"}//g"`
if [ -z "$TOKEN" ]
then
echo "Problem authenticating."
exit 1
fi
Command+E recent files
Ctrl+T refactor this: rename, variable, move method, interface
Command+N create constructor, getters, setters
Option+Enter initialize variable constructor
Shift+Shift search everywhere
Command+Up browse in current file’s folder
Command+Option+O search symbol
Command+, Settings
Control+G multiple cursors of same word
Control+V, Control+H windows splits (manually added)