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 | |
BUNDLE_PATH="/Applications/Google Chrome.app" | |
APP_PATH="$BUNDLE_PATH/Contents" | |
PLIST_PATH="$APP_PATH/Contents/Info.plist" | |
EXECUTABLE_PATH="$APP_PATH/MacOS/Google Chrome" | |
EXECUTABLE_ARGS="--args --ssl-version-min=tls1" | |
LAUNCHER_SCRIPT_FILENAME="launch-chrome-tls.sh" | |
LAUNCHER_SCRIPT_PATH="$APP_PATH/MacOS/$LAUNCHER_SCRIPT_FILENAME" |
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 | |
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 | |
# === 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
--- 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; | |
} |
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 | |
PROGRAM_NAME=`basename $0` | |
ARGS=`getopt u:H:h "$@"` | |
KEY_PATH=~/.ssh/id_rsa.pub | |
if [ $? != 0 ] ; then | |
echo "Error parsing arguments. Try $PROGRAM_NAME -h" > /dev/stderr | |
exit 2 |
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 | |
class WPMiniJSONAPI { | |
const API_ACTION_QUERY_VAR = "my-api"; | |
const API_PERMALINK_PART = "api"; | |
const API_EVENTS_PERMLINIK_PART = "events"; | |
const API_OUTPUT_FORMAT = "json"; | |
const API_EXPORT_EVENTS = "export-events"; |
OlderNewer