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

That theme looks great. I really hope that the review process would expect more business themes and the core team would provide different options and features for them, such as:

  • Preview actually displaying a sample front page that's not just a blog, or
  • Filters for themes (blog, business, portfolio, etc)
@mpeshev
mpeshev / maindomain.com.conf
Created September 20, 2015 16:45
nginx parent WordPress config
server {
listen 80;
server_name maindomain.com;
root /var/www/maindomain.com;
index index.php index.html index.htm;
location / {
index index.html index.php;
try_files $uri $uri/ /index.php?q=$uri&$args;
@mpeshev
mpeshev / subdomain.com.conf
Created September 20, 2015 16:47
nginx subfolder WordPress config
server {
listen 80;
server_name maindomain.com/forums;
root /var/www/maindomain.com/forums;
index index.php index.html index.htm;
location / {
index index.html index.php;
try_files $uri $uri/ /index.php?q=$uri&$args;
@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
*/
@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 / cookie.js
Last active December 11, 2015 05:49 — forked from anonymous/cookie.js

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 / theme-review-porto.md
Last active December 27, 2015 22:18
Theme Review Porto plan
[nofearinc@localhost devrix]$ sudo docker-compose up
Starting devrix_mysql_1 ... done
Starting devrix_mailcatcher_1 ... done
Starting devrix_elasticsearch_1 ... done
Starting devrix_memcached_1 ... done
Starting devrix_phpfpm_1 ... done
Starting devrix_wpsnapshots_1 ... done
Starting devrix_nginx_1 ... done
Attaching to devrix_mailcatcher_1, devrix_elasticsearch_1, devrix_mysql_1, devrix_memcached_1, devrix_phpfpm_1, devrix_wpsnapshots_1, devrix_nginx_1
mailcatcher_1 | Starting MailCatcher