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 --limit-rate=200k --no-clobber --convert-links --random-wait -r -p -E -e robots=off -U mozilla http://www.oldwebsite.com |
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
| RENAME TABLE wp_8_options TO wp_5_options, | |
| wp_8_posts TO wp_5_posts, | |
| wp_8_commentmeta TO wp_5_commentmeta, | |
| wp_8_comments to wp_5_comments, | |
| wp_8_links to wp_5_links, | |
| wp_8_postmeta to wp_5_postmeta, | |
| wp_8_users to wp_5_users, | |
| wp_8_usermeta to wp_5_usermeta, | |
| wp_8_terms to wp_5_terms, | |
| wp_8_term_taxonomy to wp_5_term_taxonomy, |
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
| add_action("gform_pre_render_13", "add_form13_js", 10); | |
| function add_form13_js($form) { | |
| $location = site_url("/thanks-for-your-donation"); | |
| echo ' | |
| <script type="text/javascript"> | |
| jQuery(document).bind("gform_post_render", function(){ | |
| jQuery(document).on("click", "#gform_submit_button_13", function(e) { | |
| if (document.getElementById("choice_13_18_1").checked) { | |
| //jQuery("#give-modal").hide(); | |
| } |
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
| if you want to temporarily go back to it, fool around, then come back to where you are, all you have to do is check out the desired commit: | |
| # This will detach your HEAD, that is, leave you with no branch checked out: | |
| git checkout 0d1d7fc32 | |
| Or if you want to make commits while you're there, go ahead and make a new branch while you're at it: | |
| git checkout -b old-state 0d1d7fc32 | |
| To go back to where you were, just check out the branch you were on again. |
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
| add_action( 'template_redirect', 'templateRedirect' ); | |
| function templateRedirect() { | |
| global $wp; | |
| $requestPieces = explode('/', $wp->request); | |
| if (strtolower($requestPieces[1]) == 'controlpage' ) { | |
| $_GET['sitename']=$requestPieces[2]; | |
| if(file_exists(dirname( __FILE__ ) . '/page-controlpage.php')) { | |
| loadWordPressTemplate( dirname( __FILE__ ) . '/page-controlpage.php'); |
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
| header('Content-Description: File Transfer'); | |
| header('Content-Type: application/octet-stream'); | |
| header('Content-Disposition: attachment; filename='.basename( $file_complete ) ); | |
| header('Expires: 0'); | |
| header('Cache-Control: must-revalidate'); | |
| header('Pragma: public'); | |
| header('Content-Length: ' . filesize( $file_complete ) ); | |
| echo $my_output; | |
| exit; |
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
| <html> | |
| <head> | |
| </head> | |
| <body> | |
| <div id="copy_initiator">Click me to Copy Text!</div> | |
| <script src="ZeroClipboard.min.js" type="text/javascript"></script> | |
| <script type="text/javascript"> | |
| var clip = new ZeroClipboard( document.getElementById("copy_initiator"), { | |
| moviePath: "ZeroClipboard.swf" |
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
| //* add a trace file | |
| $upload_dir = wp_upload_dir(); | |
| define('TRACEFILE', $upload_dir['basedir'] . '/trace.log'); | |
| function trace($log) { | |
| $prefix = current_time( 'mysql' ) . ": " ; | |
| $suffix = "\n" ; | |
| if ( is_array( $log ) || is_object( $log ) ) { | |
| error_log( $prefix, 3, TRACEFILE); | |
| error_log( print_r( $log, true ) , 3, TRACEFILE ); |
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
| cdsites () { cd ~/Sites/$1 ; WSITE=`pwd`; export WSITE; } | |
| alias cds=cdsites | |
| cdp () { cd "$WSITE"/wp-content/plugins/$1; } | |
| cdthemes () { cd "$WSITE"/wp-content/themes/$1; } | |
| alias cdt=cdthemes | |
| cdm () { cd "$WSITE"; } | |
| cdu () { cd "$WSITE"/wp-content/uploads/$1; } |
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
| # Attempt to load files from production if they're not in our local version | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine on | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteRule (.*) http://mydomain.com/wp-content/uploads/$1 | |
| </IfModule> |