Skip to content

Instantly share code, notes, and snippets.

View tikolakin's full-sized avatar
:octocat:
}</>

Tiko tikolakin

:octocat:
}</>
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<project name="ci-phing-behat-test" default="dev">
<!-- load variable definitions -->
<property file="build.properties"/>
<property name="behat.basedir" value="${project.basedir}/../test"/>
<!-- define custom tasks and types -->
<typedef name="args" classname="phing.behat.types.BehatArguments"/>
#!/bin/bash
PHANTOM_JS="phantomjs-1.9.8-linux-x86_64"
if [[ $EUID -ne 0 ]]; then
echo "You must be a root user" 2>&1
exit 1
else
apt-get update
apt-get install -y build-essential chrpath libssl-dev libxft-dev
apt-get install -y libfreetype6 libfreetype6-dev
apt-get install -y libfontconfig1 libfontconfig1-dev
@tikolakin
tikolakin / grep_lines
Created November 18, 2015 08:36
How to find patterns across multiple lines using grep?
#!/usr/bin/env bash
#If you are willing to use contexts, this could be achieved by typing
grep -A 500 abc test.txt | grep -B 500 efg
#This will display everything between "abc" and "efg", as long as they are within 500 lines of each other.
SELECT table_schema AS "Database name", SUM(data_length + index_length) / 1024 / 1024 AS "Size (MB)" FROM information_schema.TABLES GROUP BY table_schema;
/**
* Perform mouse hover over specific link or element selector
*
* @Given I hover mouse over :element_link in the :name region
*/
public function hoverMouseOver($element_link, $region) {
$region_obj = $this->getRegion($region);
$el = $region_obj->findLink($element_link);
if(!$el instanceof NodeElement){
$el = $this->findByCssIdOneElement($element_link);
@tikolakin
tikolakin / fish_alias.md
Last active October 3, 2024 14:06
Create alias in Fish shell and save this as a permanent function

Directly from CLI

alias x='exit'
funcsave x

or create a file in

~/.config/fish/functions 

with name

@tikolakin
tikolakin / afterFailedStepsTakeScreenshot.php
Created May 5, 2016 08:08
Take screenshot of a page where step fails.
<?php
/**
* Take screenshot of a page where step fails.
*
* @AfterStep
*/
public function afterFailedStepsTakeScreenshot(AfterStepScope $scope) {
if (\Behat\Testwork\Tester\Result\TestResult::FAILED === $scope->getTestResult()->getResultCode()) {
$driver = $this->getSession()->getDriver();
if ($driver instanceof Behat\Mink\Driver\Selenium2Driver) {
@tikolakin
tikolakin / jira-template-injector.json
Last active November 6, 2019 08:37
Template for jira-template-injector
{
"options": {
"limit": []
},
"templates": {
"BUG TEMPLATE": {
"issuetype-field": "Bug",
"text": "h4. Summary:\n<TI>Enter summary of the problem here.</TI>\n\nh4. Environment:\n<TI>provide as much as possible from the following: instance : platform : device : os : resolution</TI>\n\nh4. Steps to Reproduce:\n<TI>Enter detailed steps to reproduce here. More detail is better.</TI>\n\nh4. Actual Behaviour:\n<TI>Screenshot. Enter what should happen here.</TI>\n\nh4. Expected Behaviour:\n<TI>Enter what should happen here.</TI>\n\nh4. Additional Notes:\n<TI>Enter any other details such as examples, links to requirements, JIRA issue etc. Any criteria that might help with fixing the problem. More detail is better.</TI>\n"
},
"DEFAULT TEMPLATE": {
@tikolakin
tikolakin / MySQL_macOS_Sierra.md
Created March 16, 2017 21:30 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@tikolakin
tikolakin / MySQL_macOS_Sierra.md
Created March 16, 2017 21:30 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :