Skip to content

Instantly share code, notes, and snippets.

View mpeshev's full-sized avatar

Mario Peshev mpeshev

View GitHub Profile
# shortform git commands
alias g='git'
# generate file list modified since last commit and export to tar file
git diff-tree -z -r --no-commit-id --name-only --diff-filter=ACMRT COMMID_HASH | xargs -0 tar -rf list.tar
# export unpushed files list
git log -z origin/master..master --name-only --pretty="format:" | sort -zu | xargs -0 tar -rf list.tar
# Count the lines of each file extenion in a list of files

Making behat use phantomjs for the tests

If you want to run it on phantomjs (a headless browser) you can add this profile to your behat.yml and you need phantomjs >= 1.8.0

phantomjs:
    extensions:
        Behat\MinkExtension\Extension:
            base_url: http://dev.local
            goutte: ~
            selenium2:
 wd_host: "http://localhost:8643/wd/hub" 
@mpeshev
mpeshev / cookie.js
Last active December 11, 2015 05:49 — forked from anonymous/cookie.js
@mpeshev
mpeshev / t5-wp-load-order.php
Created November 11, 2012 20:28 — forked from thefuxia/t5-wp-load-order.php
T5 WP Load Order
<?php
/**
* Plugin Name: T5 WP Load Order
* Description: Hooks into every action and creates a list of available variables, constants, functions, classes and files.
* Plugin URI:
* Version: 2012.11.05
* Author: Thomas Scholz
* Author URI: http://toscho.de
* Licence: MIT
* License URI: http://opensource.org/licenses/MIT
@mpeshev
mpeshev / image-shortcode.php
Created March 6, 2012 07:11 — forked from kovshenin/image-shortcode.php
Image shortcode for WordPress
<?php
/**
* Image shortcode callback
*
* Enables the [image] shortcode, pseudo-TimThumb but creates resized and cropped image files
* from existing media library entries. Usage:
* [image src="http://example.org/wp-content/uploads/2012/03/image.png" width="100" height="100"]
*
* @uses image_make_intermediate_size
*/