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
function my_inspect_styles() { | |
global $wp_styles; | |
echo '<!-- Styles: '; | |
foreach( $wp_styles->queue as $handle ) { | |
echo $handle . ' | '; | |
} | |
echo '-->'; | |
} | |
function my_inspect_scripts() { | |
global $wp_scripts; |
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
# Make .git files and directory web inaccessible | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteRule ^(.*/)?\.git+ - [R=404,L] | |
</IfModule> | |
# Second line of defense (if no mod_rewrite) | |
RedirectMatch 404 ^(.*/)?\.git+ |
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
#!/bin/sh | |
cd /path/to/your/repo/ | |
gunzip -v < [database].sql.gz | mysql -u [mysql_user] -p[mysql_password] [database] | |
# Note: | |
# No need to have these comments in the file... | |
# This file's location @ /path/to/your/repo/.git/hooks/post-merge | |
# Be sure to make this file executable via: | |
# sudo chmod +x /path/to/your/repo/.git/hooks/post-merge |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.setdns</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/bin/setdns.sh</string> | |
</array> |
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
function my_deregister_styles() { | |
if (!is_page('Contact')) { | |
wp_deregister_style('contact-form-7'); | |
} | |
if (!is_single()) { | |
wp_deregister_style('tfg_style'); | |
} | |
} | |
function my_deregister_javascript() { | |
if (!is_page('Contact')) { |
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
// Note: httpd-vhosts.conf filename just used as an example. | |
// Add the following line to your apache configuration inside the VirtualDocumentRoot vhost definition | |
// E.g. | |
// <VirtualHost *:80> | |
// ... | |
// {paste here} | |
// </VirtualHost> | |
php_admin_value auto_prepend_file "/Users/USERNAME/Sites/setdocroot.php" |
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
# Customize BASH PS1 prompt to show current GIT repository and branch. | |
# by Mike Stewart - http://MediaDoneRight.com | |
# SETUP CONSTANTS | |
# Bunch-o-predefined colors. Makes reading code easier than escape sequences. | |
# I don't remember where I found this. o_O | |
# Reset | |
Color_Off="\[\033[0m\]" # Text Reset |
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
// search filter | |
function fb_search_filter($query) { | |
if ( !$query->is_admin && $query->is_search) { | |
$query->set('post_type', array('video-camera', 'software-solution','post') ); // id of page or post | |
} | |
return $query; | |
} | |
add_filter( 'pre_get_posts', 'fb_search_filter' ); |
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
#profile_popup .modal, .profile-card.profile-header, #activity-popup-dialog .modal { | |
width: 600px; | |
} | |
.account-summary .avatar { | |
top: 0.5em; | |
} | |
.activity-popup-users .avatar { | |
top: 0.9em; |
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
@mixin ie7icon($arguments...) { | |
*zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = #{$arguments}); | |
} | |
.icon-music { @include ie7icon(''); } | |
.icon-search { @include ie7icon(''); } | |
.icon-envelope { @include ie7icon(''); } | |
// and so on... |