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 | |
/* | |
Plugin Name: Override WPtouch URLs | |
Plugin URI: http://dessibelle.se | |
Description: Overrides WPtouch's content_url function to make use of `content_url` instead of `WP_CONTENT_URL`. | |
Author: Simon Fransson | |
Version: 1.0 | |
Author URI: http://dessibelle.se/ | |
*/ |
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
// Prints WordPress memory consumption in footer. Measured at script start, 'init', 'wp_head' and 'wp_footer'. | |
$start = memory_get_usage(); | |
add_action('wp_head', create_function('', 'global $header; $header = memory_get_usage();')); | |
add_action('wp_head', create_function('', 'global $init; $init = memory_get_usage();')); | |
add_action('wp_footer', create_function('', 'global $start; echo "<pre>Start: " . number_format($start, 0, ".", ",") . " bytes</pre>\n";')); | |
add_action('wp_footer', create_function('', 'global $init; echo "<pre>Init: " . number_format($init, 0, ".", ",") . " bytes</pre>\n";')); | |
add_action('wp_footer', create_function('', 'global $header; echo "<pre>Header: " . number_format($header, 0, ".", ",") . " bytes</pre>\n";')); | |
add_action('wp_footer', create_function('', 'echo "<pre>End: " . number_format(memory_get_usage(), 0, ".", ",") . " bytes</pre>\n";')); |
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
# Dump keychain using: security dump-keychain /Path/to/keychain.keychain -d > keychain | |
# Open resulting file in TextMate. The following regex will strip out Name, Account, Protocol, Host and Password and wrap everything else in HTML comments which can be removed using Bundles > HTML > Strip HTML tags from document… | |
# Search for | |
(?m:attributes.*?0x00000007 <blob>="([^"]+).*?"?acct"<blob>="([^"]+).*?"ptcl"<uint32>="([^"]+).*?"srvr"<blob>="([^"]+).*?data:\n"([^"]+)".*?class:) | |
# Replace with | |
\n\n--><entry>Name: $1\nAccount: $2\nProtocol: $3\nHost: $4\nPassword: $5</entry><!--\n\n |
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
#!/usr/bin/env bash | |
# == ABOUT == | |
# Gets localized version of WordPress and plugins from svn, sets up wp-config.php | |
# and creates database, downloads some standard components from github (and local | |
# git server) and runs theme template setup. | |
# == INSTALLATION == | |
# | |
# Install script: git clone git://gist.github.com/2666478.git tmp.$$; sudo mv tmp.$$/install-wordpress.sh /usr/bin/; chmod 755 /usr/bin/install-wordpress.sh; rm -rf tmp.$$/; |
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
#!/usr/bin/env bash | |
MISSING_DEPENDENCIES=false | |
command -v HandBrakeCLI >/dev/null 2>&1 || { echo >&2 "I require HandBrakeCLI but it's not installed."; MISSING_DEPENDENCIES=true; } | |
command -v ffmpeg2theora >/dev/null 2>&1 || { echo >&2 "I require ffmpeg2theora but it's not installed."; MISSING_DEPENDENCIES=true; } | |
if $MISSING_DEPENDENCIES ; then | |
echo >&2 "" | |
echo >&2 "Aborting." |
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
#!/usr/bin/env bash | |
if [ $# -gt 0 ] ; then | |
URL=$1 | |
else | |
while : | |
do | |
read -p "Site: " URL | |
if [ -n "$URL" ] ; then |
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
#!/usr/bin/env bash | |
# === Operation plan === | |
# | |
# [ ] Support for different systems, using `find $SITE -name wp-config.php` for WordPress | |
# [ ] Add/read/set directives for environment DEVELOPMENT / STAGING / PRODUCTION in wp-config.php etc. | |
# [ ] Different database credentials etc. depending on environment | |
# [ ] Automatically change environment in wp-config.php etc. when deploying | |
# [*] Create some kind of .deploy_rc file to hold server settings (host, credentials, remote path etc.) | |
# and store inside site directory (is that really wise?) |
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
#!/usr/bin/env bash | |
convmv -f utf8 -t utf8 --nfc --replace --nosmart --no-test -r uploads/ | |
rsync -avz -e ssh uploads/ username@host:mysite.com/public_html/wordpress/wp-content/uploads |
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
--- orig.taxonomy-order.php 2013-09-17 16:18:19.000000000 +0200 | |
+++ taxonomy-order.php 2013-09-17 16:18:50.000000000 +0200 | |
@@ -86,7 +86,7 @@ | |
self::$plugin_url = WP_PLUGIN_URL . '/' . self::$plugin_folder; | |
self::$plugin_file = self::$plugin_dir . '/taxonomy-order.php'; | |
- register_activation_hook( self::$plugin_file, array( $this, 'activation_hook' ) ); | |
+ // register_activation_hook( self::$plugin_file, array( $this, 'activation_hook' ) ); | |
add_action( 'init', array($this, 'interface_wpdbfix') ); |
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
/* CSS overrides goes here */ | |
#some-elem .some-class { | |
display: none; | |
} |
OlderNewer