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 | |
locale=$1 | |
function replace() { | |
sed -i.bak s#https://"$1".wordpress.org/forums/#https://forums.classicpress.net/c/support#g /tmp/"$1"-"$2".po | |
sed -i.bak s/WordPress.org/ClassicPress.net/g /tmp/"$1"-"$2".po | |
sed -i.bak s/WordPress/ClassicPress/g /tmp/"$1"-"$2".po | |
} |
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 | |
// Get Freemius data | |
$json = file_get_contents('php://input'); | |
$data = json_decode($json, true); | |
if( isset( $data['objects'] ) ) { | |
slack($data); | |
} | |
function slack($data) { |
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/sh | |
# If the branch is not master, execute phpmetrics and upoload everything on the VPS | |
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
if [ $current_branch != "master" ]; then | |
sshpass -p your-password ssh [email protected] mkdir -p /var/www/your-path/status/master/ | |
sshpass -p your-password rsync --progress -avzP /home/your-user/.cache/QualityAnalyzer/assets -e ssh [email protected]:/var/www/your-metrics/status/$current_branch/ > /dev/null | |
sshpass -p your-password rsync --progress -avzP /home/your-user/.cache/QualityAnalyzer/index.html -e ssh [email protected]:/var/www/your-metrics/status/$current_branch/ > /dev/null | |
/usr/bin/phpmd /var/www/VVV/www/site/public_html/wp-content/plugins/your-plugin/ xml /CodeatCS/codeat-phpmd.xml --exclude vendor,tests --reportfile /tmp/phpmd-analysis.xml | |
/home/your-user/.cache/QualityAnalyzer/bin/analyze analyze /var/www/VVV/www/site/public_html/wp-content/plugins/your-plugin/ --exclude=vendor,tests --exclude_analyzers=cpd,pdepend,checkst |
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 | |
echo "Parsing Freemius Webhook"; | |
// Get Freemius data | |
$json = file_get_contents('php://input'); | |
$data = json_decode($json, true); | |
if( isset($data['objects']['user']) ) { | |
// Let's call our opensupports instance | |
$name = $data['objects']['user']['first'] . ' ' . $data['objects']['user']['last']; |
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: Better errors | |
* Description: Better errors in log | |
* Author: Daniele Scasciafratte | |
* Version: 1.0 | |
* Author URI: http://codeat.co | |
*/ | |
function handleError($code, $description, $file = null, $line = null, $context = null) { |
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 sortArrayByArray( $array, $orderArray ) { | |
$order = array(); | |
foreach ( array_keys( $array ) as $index ) { | |
foreach ( array_keys( $orderArray ) as $key ) { | |
$order[ $index ][ $key ] = $array[ $index ][ $key ]; | |
} | |
} | |
return $order; |
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: Error For WP backend | |
Plugin URI: https://github.com/Mte90/ | |
Description: Wrap the PHP errors in the WP admin backend with the native notice | |
Author: Mte90 | |
Version: 1.0.0 | |
*/ |
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 table_from_array( $cols, $tableclass = 'info' ) { | |
$content = "<table class=\"" . $tableclass . "\">\n"; | |
$i = 1; | |
foreach ( $cols as $key => $value ) { | |
if ( !empty( $value ) ) { | |
$i++; | |
if ( $i % 2 === 0 ) { | |
$content .= "<tr>"; | |
} |
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: Dashboard Widget Activity Custom Post Type | |
Plugin URI: | |
Description: | |
Author: Daniele Mte90 Scasciafratte | |
Version: 1.0.0 | |
Author URI: http://mte90.net | |
*/ |
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
Download from https://bugzilla.mozilla.org/show_bug.cgi?id=926940 the development build with the WebSerial API | |
Screenshot: https://plus.google.com/u/0/+DanieleScasciafratteMte90Net/posts/EED6sbEt2zv |