Skip to content

Instantly share code, notes, and snippets.

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

Tiko tikolakin

:octocat:
}</>
View GitHub Profile
/**
* 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);
SELECT table_schema AS "Database name", SUM(data_length + index_length) / 1024 / 1024 AS "Size (MB)" FROM information_schema.TABLES GROUP BY table_schema;
@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.
#!/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
<?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"/>