I got a "too many open files" error.
Error: EMFILE: too many open files, open '/path/to/filename'
I solved the problem by changing the file descriptor limit setting.
<?php | |
// Load the WooCommerce email templates. | |
$wc_emails = WC()->mailer()->get_emails(); | |
/** | |
* You can specify which template mail is to be sent from the following array elements. | |
* 'WC_Email_New_Order' | |
* 'WC_Email_Cancelled_Order' | |
* 'WC_Email_Failed_Order' | |
* 'WC_Email_Customer_On_Hold_Order' |
<?php | |
// LDAP settings | |
const LDAP_HOST = "ldap-host"; | |
const LDAP_PORT = 389; | |
const LDAP_DC = "dc=example,dc=com"; | |
const LDAP_CN = "admin"; | |
const LDAP_PASS = "password"; | |
// Connect | |
$ldap_conn = ldap_connect(LDAP_HOST, LDAP_PORT); |
<?php | |
/** | |
* Add japanese providers for WooCommerce Shipment Tracking | |
* | |
* @param array $providers | |
* | |
* @return array | |
*/ | |
add_filter( 'wc_shipment_tracking_get_providers', function ( $providers ) { | |
$providers = array_merge( $providers, [ |
______ _____ _______ _____ ______ __ _ | |
| ____ | | |______ | | ____ | \ | | |
|_____| |_____| ______| __|__ |_____| | \_| | |
Laravel Homestead is official local development environment.
It is a great tool that allows you to easily create an environment with all the functions required for development.
The following is the steps for installing Laravel 6.x on MacOS with Homestead.
Install VirtualBox.
Install Vagrant.
#!/bin/sh | |
curl -X POST https://slack.com/api/chat.postMessage \ | |
-d "token=[REPLACE-YOUR-TOKEN]" \ | |
-d "channel=#general" \ | |
-d "text=Hello World!<!channel>" |
<?php | |
// Your slack token | |
$token = 'YOURTOKEN'; | |
// Your slack channel (e.g. #general) | |
$channel = '#general'; | |
// Post message | |
$text = "<!channel>Hello World!"; |