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
<?php | |
if ( defined( 'WP_CLI' ) && WP_CLI ) { | |
\WP_CLI::add_command( 'galaxy', function () { | |
$count = count( $_SERVER['argv'] ); | |
for ( $i = 0; $i < $count; $i++ ) { | |
// strip any preceeding arguments so galaxy isn't confused. | |
$arg = array_shift( $_SERVER['argv'] ); | |
if ( 'galaxy' == $arg ) { | |
array_unshift( $_SERVER['argv'], 'galaxy' ); | |
break; |
#!/bin/bash | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
apt-get install pkg-config libmagickwand-dev -y | |
cd /tmp | |
wget https://pecl.php.net/get/imagick-3.4.3.tgz | |
tar xvzf imagick-3.4.3.tgz |
// Replace letters | |
@function str-replace($string, $search, $replace: '') { | |
$index: str-index($string, $search); | |
@if $index { | |
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace); | |
} | |
@return $string; | |
} |
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
This is a short overview on how to completely remove any old mysql server installs in OSX and upgrade to MariaDB without conflicts. Things can get a bit weird when you have various old installs of MySQL server floating around, and utilizing homebrew to install and upgrade MariaDB as a drop in replacement for MySQL has worked well, especially if you're used to managing MySQL installs via yum in linux.
Backup all of your current databases with mysqldump
This isn't a tutorial on backups, and there are many ways to do it. You should know how to backup your data anyway. For this example, we'll do a full backup of our InnoDB databases.
<?php | |
use Illuminate\Console\Command; | |
use Symfony\Component\Console\Input\InputOption; | |
use Symfony\Component\Console\Input\InputArgument; | |
class ClearBeanstalkdQueueCommand extends Command { | |
/** |
<?php | |
class MyModel extends Eloquent { | |
public function getSql() | |
{ | |
$builder = $this->getBuilder(); | |
$sql = $builder->toSql(); | |
foreach($builder->getBindings() as $binding) | |
{ |
<?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 <barryvdh@gmail.com> | |
* @see https://github.com/barryvdh/laravel-ide-helper | |
*/ | |
namespace { | |
exit("This file should not be included, only analyzed by your IDE"); |
<snippet> | |
<content><![CDATA[ | |
<!-- For details, see http://hicksdesign.co.uk/journal/pinned-sites-in-windows-8 --> | |
<meta name="msapplication-TileImage" content=“${1:filename.png}”> | |
<meta name="msapplication-TileColor" content="#${2:hex-value}”> | |
<meta name="application-name" content=${3:Win8-specific application title}”> | |
]]></content> | |
<description>Windows 8 tile specification for pinning to start screen</description> | |
<tabTrigger>win8tile</tabTrigger> | |
<scope>text.html</scope> |