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
#!/bin/bash | |
# Author: Mark P. Lindhout | |
# Date: 2013-02-10 | |
# Remarks: | |
# This file can be used for backing up servers to an RSYNC server. It assumes: | |
# 1. The existence of the /var/mysqldumps/ and /var/installed-packages/ folders | |
# 2. An SSH key already exchanged with the $REMOTE_HOST | |
# 3. Existing folders on the $REMOTE_HOST for each daily, weekly and monthly backups. | |
# 4. The possibility to do mysql and mysqldump commands without needing a password. |
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
UPDATE wp_options SET option_value = replace(option_value, 'http://old.url', 'http://new.url') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://old.url','http://new.url'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://old.url', 'http://new.url'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://old.url','http://new.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
syntax "css" "\.css$" | |
color brightblue start="." end="$" | |
color brightyellow start="\{" end="\}" | |
color white start=":" end=";|$" | |
color yellow ":active|:focus|:hover|:link|:visited|:link|:after|:before" | |
color brightwhite "\'|\"" | |
color brightred ";|:" | |
color red start="\[" end="\]" | |
color green start="/\*" end="\*/" |
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
/* | |
This code should be added to your 'functions.php'. | |
Please replace 'mytheme' with a unique name of your choosing. | |
*/ | |
/* This function creates the meta box HTML */ | |
function mytheme_create_cta_metabox() { | |
global $post; |
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
ssh user@host.domain.tld -L 2143:localhost:143 -L 2025:localhost:25 |
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
xgettext --from-code=utf-8 -k_e -k_x -k__ -o languages/default.pot $(find . -name "*.php") |