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/bash | |
for DIR in /var/www/*/public_html; do | |
cd $DIR | |
if [ -f "wp-config.php" ]; then | |
echo "cd $DIR" |
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/bash | |
for DIR in /var/www/*/public_html; do | |
cd $DIR | |
if [ -f "wp-config.php" ]; then | |
echo "cd $DIR" |
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/bash | |
echo "Enter the domain of the site you want to create:" | |
read DOMAIN | |
if [ -d /var/www/$DOMAIN ]; then | |
echo -e "\x1b[1;31mError:\e[0m $DOMAIN already exists!" |
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/bash | |
echo "Enter the domain of the site you want to remove:" | |
read DOMAIN | |
if [ ! -d /var/www/$DOMAIN ]; then | |
echo -e "\x1b[1;31mError:\e[0m $DOMAIN does not exist!" |
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/bash | |
CODECEPTION_CHECK=1 | |
SELF_DIR=$( pwd ) | |
echo "Checking staged changes..." | |
# Run Codeception tests | |
if [ "$CODECEPTION_CHECK" == 1 ]; then | |
if [ -f "$SELF_DIR/codeception.yml" ]; then |
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 | |
/** | |
* Recursively replace elements from passed arrays into the first array (safe for PHP 5.2). | |
* | |
* @author Frankie Jarrett <fjarrett@gmail.com> | |
* @link http://php.net/manual/en/function.array-replace-recursive.php | |
* | |
* @param array $array1 | |
* @param array $array2 |
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/bash | |
echo -n "Enter a URL to load test: " | |
read URL | |
# Ensure the URL has a trailing slash | |
[[ ${URL:${#URL}-1:1} != "/" ]] && URL="$URL/"; : | |
echo -n "Number of requests: " | |
read REQUESTS |
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_action( 'plugins_loaded', function() { | |
add_filter( 'locale', function( $locale ) { | |
return is_admin() ? 'en_US' : $locale; | |
} ); |
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
<div id="top"></div> | |
<p>The purpose of this HTML is to help determine what default settings are with CSS and to make sure that all possible HTML Elements are included in this HTML so as to not miss any possible Elements when designing a site.</p> | |
<hr /> | |
<h1 id="headings">Heading 1</h1> | |
<h2>Heading 2</h2> | |
<h3>Heading 3</h3> | |
<h4>Heading 4</h4> |
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 | |
/** | |
* Replaces paragraph elements with double line-breaks. | |
* | |
* This is the inverse behavior of the wpautop() function | |
* found in WordPress which converts double line-breaks to | |
* paragraphs. Handy when you want to undo whatever it did. | |
* | |
* @see wpautop() |