This file contains hidden or 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: CLI Export Multisite | |
| */ | |
| if ( ! defined( 'WP_CLI' ) ) return; | |
| use \WP_CLI\Utils; | |
| /** |
This file contains hidden or 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 | |
| $apikey = ""; // Your API key | |
| $workspace = ''; // your project's workspace ID | |
| $project = ''; // your project's ID | |
| $tasks = array( | |
| 'Task 1', | |
| 'Task 2', | |
| 'Task 3' | |
| // etc |
This file contains hidden or 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
| #!/usr/bin/env python | |
| """ | |
| To use this you have to include the task ID on the commit message. | |
| Example: Fixing typo, #9283764018 | |
| You can as well close a task within the commit message. | |
| Example: Improving the docs, closes #9823761989 | |
| """ |
This file contains hidden or 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/bash | |
| apikey=$(git config user.asana-key) | |
| if [ $apikey == '' ] ; then exit 0; fi | |
| comment=$(git log --pretty=oneline -n1) | |
| taskid_pattern='.*#([0-9]*).*' | |
| if [[ $comment =~ $taskid_pattern ]]; then | |
| taskid=${BASH_REMATCH[1]} | |
| apikey=$(git config user.asanakey) |
This file contains hidden or 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 asanaRequest($methodPath, $httpMethod = 'GET', $body = null) | |
| { | |
| $apiKey = 'ASANA_API_KEY_HERE'; /// Get it from http://app.asana.com/-/account_api | |
| $url = "https://app.asana.com/api/1.0/$methodPath"; | |
| $ch = curl_init(); | |
| curl_setopt($ch, CURLOPT_URL, $url); | |
| curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC ) ; | |
| curl_setopt($ch, CURLOPT_USERPWD, $apiKey); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
This file contains hidden or 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 "Formats" dropdown to TinyMCE Editor | |
| */ | |
| function matt2015_mce_formats($buttons) { | |
| array_unshift($buttons, 'styleselect'); | |
| return $buttons; | |
| } | |
| add_filter('mce_buttons_2', 'matt2015_mce_formats'); |
This file contains hidden or 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 | |
| /** | |
| * Optimize WooCommerce Scripts | |
| * Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages. | |
| */ | |
| add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); | |
| function child_manage_woocommerce_styles() { | |
| //remove generator meta tag | |
| remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); |
This file contains hidden or 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 | |
| /** | |
| * start the customisation | |
| */ | |
| function custom_woo_before_shop_link() { | |
| add_filter('woocommerce_loop_add_to_cart_link', 'custom_woo_loop_add_to_cart_link', 10, 2); | |
| add_action('woocommerce_after_shop_loop', 'custom_woo_after_shop_loop'); | |
| } | |
| add_action('woocommerce_before_shop_loop', 'custom_woo_before_shop_link'); |
This file contains hidden or 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 | |
| /* Function submitBug - sends the bug to the bitbucket API. Must contain title and content. User name/email is optional.*/ | |
| function submitBug($title, $content, $user='Anonymous', $bbAccount, $bbRepo, $basicAuth, $component='', $status='new', $priority='major', $kind='bug'){ | |
| $url = 'https://api.bitbucket.org/1.0/repositories/'.$bbAccount.'/'.$bbRepo.'/issues/'; | |
| $ch = curl_init($url); | |
| if (get_magic_quotes_gpc()) { | |
| $title = stripslashes($title); | |
| $content = stripslashes($content); |
This file contains hidden or 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
| on_sent_ok: "jQuery(String.fromCharCode(60)+'img/'+String.fromCharCode(62)).attr('height','1').attr('width','1').css('border-style','none').attr('src','REPLACE_THIS_WITH_YOUR_NOSCRIPT_SRC').appendTo('body');" |