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
// Create new DOMDocument | |
$cmb2_mb = new DOMDocument(); | |
// Load cmb2 metabox html string into document | |
$cmb2_mb->loadHTML( $form, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD ); | |
// Add bootstrap classes to all labels | |
foreach ( $cmb2_mb->getElementsByTagName( 'label' ) as $node_label ) { | |
$node_label->setAttribute( 'class', 'control-label' ); | |
} |
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
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# Force SSL | |
RewriteCond %{HTTPS} off | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] |
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
wget http://wordpress.org/latest.tar.gz && tar xfz latest.tar.gz && mv wordpress/* ./ && rmdir ./wordpress/ && rm -f latest.tar.gz |
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
#!/bin/bash | |
USER="root" | |
ExcludeDatabases="Database|information_schema|performance_schema|mysql" | |
databases=`mysql -u $USER -e "SHOW DATABASES;" | tr -d "| " | egrep -v $ExcludeDatabases` | |
for db in $databases; do | |
echo "Dumping database: $db" | |
mysqldump -u $USER --databases $db > `date +%Y%m%d`.$db.sql |
NewerOlder