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 | |
// PHP memory limit for this site | |
define( 'WP_MEMORY_LIMIT', '128M' ); | |
define( 'WP_MAX_MEMORY_LIMIT', '256M' ); // Increase admin-side memory limit. | |
// Database | |
define( 'WP_ALLOW_REPAIR', true ); // Allow WordPress to automatically repair your database. | |
define( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true ); // Don't make database upgrades on global tables (like users) | |
// Explicitely setting url |
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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
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 | |
Copied from http://fatlabmusic.com/blog/2009/08/12/how-to-fix-wp-http-error-name-lookup-timed-out/ | |
//adjustments to wp-includes/http.php timeout values to workaround slow server responses | |
add_filter('http_request_args', 'bal_http_request_args', 100, 1); | |
function bal_http_request_args($r) //called on line 237 | |
{ | |
$r['timeout'] = 15; | |
return $r; | |
} | |
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
DROP TABLE IF EXISTS wp_users; | |
CREATE TABLE wp_users ( | |
ID bigint(20) unsigned NOT NULL auto_increment, | |
user_login varchar(60) NOT NULL default '', | |
user_pass varchar(64) NOT NULL default '', | |
user_nicename varchar(50) NOT NULL default '', | |
user_email varchar(100) NOT NULL default '', | |
user_url varchar(100) NOT NULL default '', | |
user_registered datetime NOT NULL default '0000-00-00 00:00:00', | |
user_activation_key varchar(60) NOT NULL default '', |
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 | |
/** | |
* Integrate custom post types into Flatsome 3 page builder application using a child theme. | |
* | |
* This will provide: | |
* | |
* 1. Page Builder Editor support for custom post types | |
* 2. Integration with page builder post element components | |
**/ |
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
property AIRDROP_FOLDER : "Path:to:AirDrop:Folder:in:Alias:format" | |
property QUARANTINE_KEY : "59" | |
property GET_QUARANTINE_COMMAND_START : "ls -l -@ '" | |
property GET_QUARANTINE_COMMAND_END : "' | tr '\\n' ' ' | sed 's/.*com\\.apple\\.quarantine\\s*\\(\\d*\\)/ \\1/' | awk '{$1=$1};1'" | |
on adding folder items to this_folder after receiving added_items | |
repeat with i from 1 to length of added_items | |
set current_item to item i of added_items | |
set quarantine_type to getQuarantineType(POSIX path of current_item) |
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
// there are many json-schema validators available, I prefer ajv | |
let Ajv = require('ajv') | |
let ajv = Ajv({ allErrors:true }) | |
let swagger = require('./docs/my-swagger-definition') | |
// validation middleware | |
let validateSchema = (parameters) => { | |
return (req, res, next) => { | |
let errors = [] | |
parameters.map(param => { |
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 | |
// Just require() this class via your theme's functions.php file. | |
/* Then instantiate this at the top of your 404.php file with: | |
if ( class_exists( 'Clean_404_Email' ) ) | |
new Clean_404_Email; | |
*/ | |
class Clean_404_Email { | |
var $time, $request, $blog, $email, $theme, $theme_data, $site, $referer, $string, $address, $remote, $agent, $message; |
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
https://wpactivitylog.com/support/kb/plugin-database-documentation/ | |
https://wpactivitylog.com/support/kb/wordpress-activity-log-deleted-plugin-uninstall-option/ | |
https://wpactivitylog.com/support/kb/activity-log-retention-policies/ | |
https://wpactivitylog.com/support/kb/wordpress-activity-log-slow-down-website/ |
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
https://codewp.ai/ | |
https://codewp.tawk.help/ | |
https://codewp.ai/best-practices-for-prompting-codewp/ | |
https://codewp.ai/snippets/ | |
https://codewp.ai/snippets/?_generation_mode=701 | |
https://codewp.ai/snippets/?_generation_mode=709 |
NewerOlder