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
AuthUserFile /local/path/.htpasswd | |
AuthType Basic | |
AuthName "Insert a message here" | |
Require valid-user |
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
$('#dl-container-id').on('click', 'dt.class-name', function() { | |
$(this).next().toggle(); | |
}); |
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
/* Minifies HTML and removes comments (except IE tags and comments within script tags) | |
* | |
* To disable compression of code portions, use '<!--wp-html-compression no compression-->' tag | |
* | |
* @see http://forrst.com/posts/Wordpress_Minify_output_HTML-29q | |
* @see http://www.intert3chmedia.net/2011/12/minify-html-javascript-css-without.html | |
*/ | |
class WP_HTML_Compression | |
{ | |
// Settings |
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 | |
/** | |
* Copyright Years | |
* Outputs an years range based on specified year to current year | |
* | |
* @param int $copyYear - the year since the copyright starts (should be lower than current year) | |
* @return string - a range of years (eg. "2000-2010") | |
*/ | |
function copyright( $copyYear ) { |
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 | |
/** | |
* Get Terms used by Post Type | |
* Fetches only terms actually used by posts of a specified post type | |
* | |
* @param string $taxonomy the taxonomy to look for terms | |
* @param string $post_type the post type to match the taxonomy terms found | |
* | |
* @return array the query result (an array of taxonomy terms as objects) |
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 | |
/** | |
* Limit WordPress media uploader maximum upload file size | |
* Uploading very large images is pointless as they will hardly ever be used at full size. | |
* Crunching larger files takes more memory; larger files take more space too. | |
* | |
* @param mixed $file the uploaded file item to filter | |
* | |
* @return array $file the filtered file item with response |
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 | |
/** | |
* Sets a 'wp_debug' cookie for logged in WordPress administrators | |
* In conjunction with a properly configured wp-config.php, it can enable WP_DEBUG mode conditionally. | |
* | |
* @link http://wordpress.stackexchange.com/questions/69549/define-wp-debug-conditionally-for-admins-only-log-errors-append-query-arg-f | |
*/ | |
function set_admin_debug_cookie( $user_login, $user ) { |
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 | |
// enter your database name | |
$database_name = 'name'; | |
// enter your database user name | |
$database_username = 'user'; | |
// enter your database user password | |
$database_password = 'password'; | |
$connection = mysql_connect( 'localhost', $database_username, $database_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
echo options thinkpad_acpi dbg_bluetoothemul=1 bluetooth_state=1 | sudo tee -a /etc/modprobe.d/thinkpad_acpi.conf |
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
# See: http://stackoverflow.com/questions/1071857/how-do-i-svn-add-all-unversioned-files-to-svn | |
svn add --force * --auto-props --parents --depth infinity -q |
OlderNewer