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
curl -I -L domain.com |
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
//http://wordpress.org/support/topic/taxonomy-title-output?replies=7 slambert | |
<?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); echo $term->name; ?> | |
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
//Gzip a site on the server as a backup | |
tar -zcvf domain.com.tar.gz /home/jasper/domain.com | |
//Gunzip a gzipped tar file | |
tar -zxvf domain.com.tar.gz | |
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 find all active plugins | |
SELECT * FROM wp_options WHERE option_name = 'active_plugins'; | |
// Then remove all code indicating which plugins are active and save again |
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
//In /home/username/.php/5.3 | |
//and a file called "phprc" with following content - 2 rows only which is to be found in above folder: | |
//log_errors = 1 | |
//error_log = /home/user/php_errors.txt | |
cd /home/user | |
mkdir .php && cd .php | |
mkdir 5.3 | |
cd 5.3 | |
nano phprc | |
//add the lines |
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
//Go into the the folder containing all files in the root domain | |
//Enter the following command assuming both domains are in the same | |
//user folder like at Dreamhost and most hosters | |
//http://forums.devshed.com/linux-help-33/how-to-copy-all-content-of-a-directory-26094.html | |
cp -R * ../sub.domain.com/ |
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
trac-admin /home/username/trac.domain.com/new-repo-name resync |
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 | |
//http://www.webhostingtalk.com/showthread.php?t=218863 | |
$start_dir = 'whatever'; // Starting directory no trailing slashes. | |
$perms['file'] = 0644; // chmod value for files don't enclose value in quotes. | |
$perms['folder'] = 0755; // chmod value for folders don't enclose value in quotes. | |
function chmod_file_folder($dir) { | |
global $perms; | |
$dh=@opendir($dir); |
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
//NB Replace wp with your own prefix | |
//see http://stackoverflow.com/questions/17099905/replace-old-wordpress-post-content-with-new-if-not-empty | |
//For Lorem Ipsum Content see http://www.blindtextgenerator.com/lorem-ipsum | |
UPDATE wp_posts SET post_content = 'NewText' WHERE post_content > '' |
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
Public Sub AllInternalPasswords() | |
' Breaks worksheet and workbook structure passwords. Bob McCormick | |
' probably originator of base code algorithm modified for coverage | |
' of workbook structure / windows passwords and for multiple passwords | |
' | |
' Norman Harker and JE McGimpsey 27-Dec-2002 (Version 1.1) | |
' Modified 2003-Apr-04 by JEM: All msgs to constants, and | |
' eliminate one Exit Sub (Version 1.1.1) | |
' Reveals hashed passwords NOT original passwords | |
Const DBLSPACE As String = vbNewLine & vbNewLine |