docker stop $(docker ps -qa) && docker rm $(docker ps -qa) && docker rmi -f $(docker images -qa) && docker volume rm $(docker volume ls -q) && docker network rm $(docker network ls -q)
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
// APIStoreProps are properties that need to be | |
// ignored when running APIStore.makeStore() | |
const APIStoreProps = ['use', 'classes', 'constructor', 'init', 'state'] | |
// getMethods returns methods defined | |
// in a given class' prototype, except init and constructor | |
const getMethods = (cls) => { | |
return Object.getOwnPropertyNames(cls.prototype) | |
.reduce((obj, prop) => { |
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: Mihdan: Image Placeholder | |
*/ | |
namespace Mihdan\Image_Placeholder; | |
$images = array( | |
// Обычные | |
'https://placeimg.com/640/480/animals', |
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
// APIStoreProps are properties that need to be | |
// ignored when running APIStore.makeStore() | |
const APIStoreProps = ['use', 'classes', 'constructor', 'init', 'state'] | |
// getMethods returns methods defined | |
// in a given class' prototype, except init and constructor | |
const getMethods = (cls) => { | |
return Object.getOwnPropertyNames(cls.prototype) | |
.reduce((obj, prop) => { |
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 | |
/** @constant string THEME_NAME **/ | |
define( 'THEME_NAME', get_option('stylesheet') ); | |
/** | |
* Custom script | |
*/ | |
function my_scripts_method() { | |
wp_enqueue_script( | |
'custom-script', |
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
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
[client-server] | |
port = 3306 | |
socket = /run/mysqld/mysqld.sock | |
[client] | |
[mysqld] | |
user = mysql | |
pid-file = /run/mysqld/mysqld.pid | |
basedir = /usr |
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
# Edit out homestead settings | |
homestead edit | |
# Enter your details, https://blackfire.io/account/credentials | |
# See re-provision your homestead box | |
vagrant global-status | |
vagrant provision ???? # << this is the id of the homestead instance you have running, from global-status | |
# So far this didn't work so carry on... |
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
<? | |
//Include Predis library. See https://github.com/nrk/predis for more info | |
require "Predis/Autoloader.php"; | |
//Connect to Redis | |
Predis\Autoloader::register(); | |
try { | |
$redis = new Predis\Client(); | |
$redis = new Predis\Client(array( | |
"scheme" => "tcp", |
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 | |
defined( 'ABSPATH' ) OR exit; | |
/** | |
* Plugin Name: (WCM) RSS Importer | |
*/ | |
add_action( 'plugins_loaded', array( 'WCMRSSImporterBootstrap', 'init' ) ); | |
class WCMRSSImporterBootstrap | |
{ | |
protected static $instance = null; |
NewerOlder