I hereby claim:
- I am jacobmc on github.
- I am jacobmc (https://keybase.io/jacobmc) on keybase.
- I have a public key ASA1BiecECFNC-X99Cf4fhIG8V9x_9FcGii4cwy_3oKzUgo
To claim this, I am signing this object:
# BEGIN Dev Image | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{HTTP_HOST} ^example.localhost$ | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_URI} ^\/app\/uploads\/(?!beaverbuilder)[^\/]*\/.*$ | |
RewriteRule ^(.*)$ https://www.example.com/$1 [QSA,L] | |
</IfModule> |
# BEGIN Dev Image | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{HTTP_HOST} ^example.localhost$ | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_URI} ^\/app\/uploads\/(?!beaverbuilder)[^\/]*\/.*$ | |
RewriteRule ^(.*)$ https://www.example.com/$1 [QSA,L] | |
</IfModule> |
#!/bin/bash | |
read -p "Have you pulled the latest changes? (y/N)" pulled | |
## Exit if user has not pulled latest changes | |
if [ "$pulled" != "y" ]; then | |
echo "exiting..." | |
exit | |
fi |
/** | |
* Use by adding the .anchor-link class to any anchor links on the page. | |
* | |
* Works by adding a span element as the first child of the anchor link element and | |
* setting it's height to the height of the header. | |
*/ | |
(function() { | |
const header = document.getElementById('header'), | |
headerHeight = header.offsetHeight, | |
anchorLinks = document.querySelectorAll('.anchor-link'), |
/** | |
* Converts string to camel case | |
* | |
* Changes characters following a hyphen, underscore, space, or period. | |
* | |
* Thanks @vitaly-t for this function (https://stackoverflow.com/questions/2970525/converting-any-string-into-camel-case#answer-57927739) | |
*/ | |
function camelize(text) { | |
text = text.replace(/[-_\s.]+(.)?/g, (_, c) => c ? c.toUpperCase() : ''); | |
return text.substr(0, 1).toLowerCase() + text.substr(1); |
# BEGIN Dev Image | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{HTTP_HOST} ^example.localhost$ | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_URI} ^\/app\/uploads\/(?!beaverbuilder)[^\/]*\/.*$ | |
RewriteRule ^(.*)$ https://www.example.com/$1 [QSA,L] | |
</IfModule> |
# Commands for updating the WordPress database for a migration | |
# from a flat WordPress install to a Bedrock install | |
wp search-replace /wp-content /app --all-tables | |
wp search-replace /wp-admin /wp/wp-admin --all-tables | |
wp search-replace /wp-login.php /wp/wp-login.php --all-tables | |
wp search-replace /xmlrpc.php /wp/xmlrpc.php --all-tables | |
# Chained Commands | |
wp search-replace /wp-content /app --all-tables && wp search-replace /wp-admin /wp/wp-admin --all-tables && wp search-replace /wp-login.php /wp/wp-login.php --all-tables && wp search-replace /xmlrpc.php /wp/xmlrpc.php --all-tables |
function var_error_log( $object=null ){ | |
ob_start(); // start buffer capture | |
var_dump( $object ); // dump the values | |
$contents = ob_get_contents(); // put the buffer into a variable | |
ob_end_clean(); // end capture | |
error_log( $contents ); // log contents of the result of var_dump( $object ) | |
} | |
$object = new MyObject(); | |
var_error_log( $object ); |
I hereby claim:
To claim this, I am signing this object: