Skip to content

Instantly share code, notes, and snippets.

View ygerasimov's full-sized avatar

Yuriy Gerasimov ygerasimov

View GitHub Profile
@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 / 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
{#
/**
* @file
* Theme override for a breadcrumb trail.
*
* Available variables:
* - breadcrumb: Breadcrumb trail items.
*/
#}
@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
@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"
if (window.location.hash == '#language-switcher') {
jQuery('.language-select').click();
}
if (window.location.hash == '#second-slide') {
jQuery('#slick-slide-control01').click();
}
<?php
use Diffy\Diffy;
use Diffy\Screenshot;
use Diffy\Diff;
// https://pantheon.io/docs/guides/quicksilver/variables
$pantheon_environment = $_ENV['environment'];
// Not sure how these are build for your site.
@ygerasimov
ygerasimov / inherit.twig
Created February 7, 2023 15:03
Demonstrate twig inheritance.
{% include "@atoms/text/headings/_heading.twig" with {
"heading_level": 2,
"heading": label,
"heading_url": url,
"heading_link_attributes": {
'rel': 'bookmark'
},
} %}
# PHP CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-php/ for more details
#
orbs:
node: circleci/[email protected]
version: 2.1
jobs:
services:
apache:
commands:
init:
# The Diffy CLI tool requires PHP. If the service image does not have PHP
# installed, do it here
#- apt-get update
#- apt-get install php-cli
# Download the Diffy CLI tool, and authenticate. The latest version can be