Install git:
sudo apt-get install git
Configure Git:
touch ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
git config --global user.name "Your Name"
git config --global user.email "Your Email"
Install git:
sudo apt-get install git
Configure Git:
touch ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
git config --global user.name "Your Name"
git config --global user.email "Your Email"
| //Display Images From A Folder with PHP | |
| <?php | |
| $files = glob("images/*.*"); | |
| for ($i=1; $i<count($files); $i++) | |
| { | |
| $num = $files[$i]; | |
| echo '<img src="'.$num.'" alt="random image">'." "; | |
| } | |
| ?> |
| #301 Redirects for .htaccess | |
| #Redirect a single page: | |
| Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
| #Redirect an entire site: | |
| Redirect 301 / http://www.domain.com/ | |
| #Redirect an entire site to a sub folder | |
| Redirect 301 / http://www.domain.com/subfolder/ |
| <?php | |
| /** | |
| * Todo: Send a random user agent string and sleep a random amount between requests. | |
| */ | |
| if ($_SERVER['REQUEST_METHOD'] == 'POST') { | |
| // Extract and sanatize input: | |
| $domain = filter_input(INPUT_POST, 'domain', FILTER_SANITIZE_URL); | |
| $terms = filter_input(INPUT_POST, 'terms', FILTER_SANITIZE_STRING); | |
| // Setup Goutte (which also includes Guzzle): |
| ```Php | |
| function dateConvert($x_date){ | |
| $x_date = explode('/', $x_date, 4); | |
| $x_months = array('','January','Febuary', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); | |
| $x_month = intval($x_date[0]); | |
| $x_day = intval($x_date[1]); | |
| $x_year = $x_date[2]; | |
| return ($x_months[$x_month]." ".$x_day. ", ".$x_year); | |
| }``` |
| <?php | |
| /** | |
| * A helper file for Laravel 5, to provide autocomplete information to your IDE | |
| * Generated for Laravel 5.5.13 on 2017-09-28. | |
| * | |
| * @author Barry vd. Heuvel <[email protected]> | |
| * @see https://github.com/barryvdh/laravel-ide-helper | |
| */ | |
| namespace { | |
| exit("This file should not be included, only analyzed by your IDE"); |
| //How to edit a user profile on the front end? | |
| //http://wordpress.stackexchange.com/questions/9775/how-to-edit-a-user-profile-on-the-front-end | |
| //Forcing nickname as display_name in custom edit profile template | |
| //http://wordpress.stackexchange.com/questions/35403/forcing-nickname-as-display-name-in-custom-edit-profile-template | |
| /////// | |
| <?php |
| // Go to menue: | |
| // find->find in files | |
| // Switch on reg_ex button | |
| // Find: | |
| ^(.*)$ | |
| // Where: | |
| c:\your_folder\,*.php,*.phtml,*.js,*.inc,*.html, -*/folder_to_exclude/* | |
| // Then click on the find button | |
| // Be careful to not click on Replace!!! |
| function register_watermarked_size() { | |
| add_image_size( 'watermarked', 550, 550, true ); // This is what should be uploaded | |
| } | |
| add_action( 'init', 'register_watermarked_size' ); | |
| class Watermark_Image { | |
| // The attachment meta array | |
| public $meta = array(); |
This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.
This documentation has moved here: https://github.com/johnbillion/wp_mail