Skip to content

Instantly share code, notes, and snippets.

View alexpts's full-sized avatar
🤘
enjoying

Alex Pavlov alexpts

🤘
enjoying
  • AvitoTech
View GitHub Profile
@richard-flosi
richard-flosi / assertions-compareScreenshot.js
Created August 27, 2014 14:25
Nightwatch with Visual Regression testing
// assertions/compareScreenshot.js
var resemble = require('resemble'),
fs = require('fs');
exports.assertion = function(filename, expected) {
var screenshotPath = 'test/screenshots/',
baselinePath = screenshotPath + 'baseline/' + filename,
resultPath = screenshotPath + 'results/' + filename,
diffPath = screenshotPath + 'diffs/' + filename;
@cvrebert
cvrebert / css_regression_testing.md
Last active May 28, 2024 17:42
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
@uhtred
uhtred / nunjucks-macros.tpl
Last active May 28, 2016 07:43
Nunjucks Macros
{% macro input(name, value, type='text', class="") %}
<input type={{ type }} name={{ name }} value={{ value }} class="{{ class }}" />
{% endmacro %}
{% macro select(name='', id='', class='', options='', first='Selecione' ) %}
<select name="{{name}}" id="" {{ class }}>
{% if first %}
<option value="">{{first}}</option>
{% endif %}
{% for option in options %}
@rskvazh
rskvazh / after.sh
Created October 1, 2015 09:22
Enable xdebug.remote_autostart in homestead: ~/.homestead/after.sh
#!/bin/sh
# If you would like to do some extra provisioning you may
# add any commands you wish to this file and they will
# be run after the Homestead machine is provisioned.
sudo apt-get -y install mc
echo "PHP: enabling xdebug.remote_autostart"
XDEBUG_FILE="/etc/php5/mods-available/xdebug.ini"
@aursu
aursu / gitlab-error-encryption.md
Last active September 21, 2024 23:54
GitLab error OpenSSL::Cipher::CipherError () in app/controllers/admin/application_settings_controller.rb:40:in `update'

The issue

It happened after secrets file was lost during GitLab upgrade.

The case described in documentation When the secrets file is lost

But not completely clear.

From log file /var/log/gitlab/gitlab-rails/production.log:

@magnetikonline
magnetikonline / README.md
Last active November 18, 2024 13:18
Enable GitHub Dependabot for Golang based repositories.
@h3ssan
h3ssan / JetBrains trial reset.md
Last active November 19, 2024 23:08
Reset all JetBrains products trial in Linux

In some cases, only these lines will work

for product in IntelliJIdea WebStorm DataGrip PhpStorm CLion PyCharm GoLand RubyMine; do
    rm -rf ~/.config/$product*/eval 2> /dev/null
    rm -rf ~/.config/JetBrains/$product*/eval 2> /dev/null
done

But if not, try these