<IfModule mod_headers.c>
Header set X-Frame-Options SAMEORIGIN
Header set X-XSS-Protection "1; mode=block"
Header set X-Content-Type-Options "nosniff"
Header set Referrer-Policy "strict-origin-when-cross-origin"
Header set Strict-Transport-Security "max-age=86400; includeSubDomains;" env=HTTPS
Header set Permission-Policy "accelerometer=Origin(), autoplay=(), camera=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), publickey-credentials-get=(), usb=()"
Header always unset X-Powered-By
Header always unset server
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
# Python script to find-replace an exported DB | |
# For use when the php version timeout's or exceeding memory limits | |
# export db you want to update, rename it to backup.sql | |
# place backup in same dir as this script | |
# run script | |
# import the out.sql file | |
import re | |
from pprint import pprint |
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 | |
// Add to functions.php | |
// Remove the "[vc_*]" shortcodes usually found during migrations | |
// Add this shortcode to a debug/test page and visit it | |
// The page will render and dump all new post/pages to the screen | |
// This can take a long time if there are a lot of pages/posts | |
add_shortcode('remove-vc-shortcodes', 'remove_vc_shortcodes'); | |
function remove_vc_shortcodes() { | |
$pattern = '/\[\/?vc_.*\]?/i'; |
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 | |
// Allow svg: https://wpengine.com/resources/enable-svg-wordpress/ | |
add_filter( 'wp_check_filetype_and_ext', function($data, $file, $filename, $mimes) { | |
global $wp_version; | |
if ( $wp_version !== '4.7.1' ) { | |
return $data; | |
} | |
$filetype = wp_check_filetype( $filename, $mimes ); | |
return [ | |
'ext' => $filetype['ext'], |
- Use short grain rice, helps more if label for sushi
- can be medium grain only if you can't find short grain
- wash rice in COLD water, do not rub or crush rice just gently move around
- drain and wash again usually 4-5 times, water need to run mostly clear
- again, COLD water and be gentle
- use a rice cooker, it will be 200% easier and better in every way
- let rice cool to room temp or just above, do not work with hot ingredients
- store bought sushi vinegar or "seasonsed rice vinegar" is fine, no need to do your own or add sugar
- cucumbers should ALWAYS be english cucumbers, they are used for the really low moisture content.
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 | |
// this will probably take a while to run | |
// so don't refresh the page, if the browser complains | |
// continue to wait | |
// -1 posts per page will give ALL | |
// will default to 10 if blank | |
// default blog posts | |
$blog_args = array( |
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 | |
/** | |
* Checks that the filename has correct extensions | |
*/ | |
function validate_export( $filename ){ | |
$ext = explode(".", $filename); | |
if( $ext[1] && $ext[1] != "sql" ){ | |
return false; | |
} | |
if( $ext[2] && $ext[2] != "gz" ){ |
sshfs <USERNAME>@<SERVER>:/ /home/<PATH TO LOCAL>/ -p 2222
fusermount -u ~/
NewerOlder