This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -x | |
# Exit if any error is encountered: | |
set -o errexit | |
# git name-rev is fail | |
# Get the branch name and replace the string from an array of values for instance "feature/" with "archive/" | |
CURRENT=`git branch | grep '\*' | awk ' {print $2}'` | |
ARCHIVE=`git branch | grep '\*' | awk ' {print $2}' | sed 's,.*[a-z]/,,g' | sed 's,^,archive/,g'` | |
#Check if we are on master or develop since we don't want to tag those | |
if [ $CURRENT = 'master' ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://apis.google.com/js/plusone.js"></script> | |
<script> | |
gapi.comments.render('comments', { | |
href: window.location, | |
width: '760', | |
first_party_property: 'BLOGGER', | |
view_type: 'FILTERED_POSTMOD' | |
}); | |
</script> | |
<html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'Eight_Day_Week\Plugins\Article_Export\xml_outer_elements', function( $elements, $article ) { | |
$elements['subHeadline'] = get_post_meta( $article->ID, 'nyo_dek', true ); | |
return $elements; | |
}, 10, 2 ); | |
add_filter( 'Eight_Day_Week\Plugins\Article_Export\xml_outer_elements', function( $elements, $article ) { | |
if( function_exists( '\Eight_Day_Week\Plugins\Article_Byline\get_article_byline' ) ) { | |
$elements['byline'] = \Eight_Day_Week\Plugins\Article_Byline\get_article_byline( $article ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$posts_per_page = 100; | |
$page = 1; | |
do { | |
$posts = get_posts( [ | |
'posts_per_page' => $posts_per_page, | |
'paged' => $page, | |
] ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant ssh | |
cd /srv/www/ | |
mkdir site-name && cd site-name && mkdir htdocs && cd htdocs | |
wp core download | |
wp core config --dbname=site-name --dbuser=root --dbpass=root | |
wp db create | |
wp core install --url=site-name.dev --title=Site --admin_user=admin --admin_pass=password [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant ssh | |
cd /srv/www/ | |
mkdir site-name && cd site-name && mkdir htdocs && cd htdocs | |
wp core download | |
wp core config --dbname=site-name --dbuser=root --dbpass=root | |
# Before you install the site, you'll need to create the DB. I just pull up phpMyAdmin and create it there. | |
wp core install --url=site-name.dev --title=Site --admin_user=admin --admin_pass=password [email protected] | |
# Create the files "vvv-hosts" and "vvv-nginx.conf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
define('redesign/ninemsn/portal/news/stickyElementController',['jquery', 'redesign/ninemsn/portal/news/helper'], function ($, helper) { | |
var bufferY = 56; // Offset for fixed positioning | |
var windowTop, | |
startY, | |
blockY, | |
stopY, | |
offset; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add this to /config/bash_profile | |
function wpd { | |
export XDEBUG_CONFIG="idekey=VVVDEBUG remote_connect_back=1" | |
wp "$@" | |
unset XDEBUG_CONFIG | |
}; | |
# Run these commands: | |
# vagrant ssh | |
# sudo cp /srv/config/bash_profile /home/vagrant/.bash_profile | |
# source ~/.bash_profile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* jshint esnext: true */ | |
import Ember from 'ember'; | |
// When mixed into an Ember.Component class, actions can be explicitly or implicitly delegated to the parent. | |
// In general this makes the most sense for an app-level component, where actions are not mututated as they bubble | |
// up to higher levels. | |
export default Ember.Mixin.create({ | |
// When true, all actions will be implicitly passed on to the parent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Advanced Export | |
Plugin URI: http://wpmututorials.com/plugins/advanced-export/ | |
Description: Adds an Advanced Export to the Tools menu which allows selective exporting of pages, posts, specific categories and/or post statuses by date. | |
Version: 2.9 | |
Author: Ron Rennick | |
Author URI: http://ronandandrea.com/ | |
*/ |
NewerOlder