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
#!/sh/bin | |
### | |
# PO 2 MO files conversion. | |
# | |
# @since Monday, March 19, 2018 | |
## | |
function po2mo { | |
if ! [ -x "$(command -v msgfmt)" ]; then |
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
<?php | |
/** | |
* Plugin Name: WDS WP Migrate DB Pro No Compat on Production | |
* Plugin URI: | |
* Description: This helps protect production sites from leaving compatibility mode in WP Migrate DB Pro on which can cause ill-desired consequences. | |
* Version: 1.0.0 | |
* Author: WebDevStudios | |
* License: GPL2 | |
* | |
* @source https://gist.github.com/aubreypwd/20b030952f41b1fe8e41fe5db9fb8aad |
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
( function( $ ) { | |
// Create a jQuery Object. | |
$.fn.myObject = function() { | |
var $target = this; // Store the target element in this variable (jQuery stuff). | |
// Our stuff. | |
var application = { | |
/** |
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
var t = false; // Default. | |
// Get the right target being clicked. | |
if ( 'target' in event ) { | |
t = event.target.localName; // Gecko | |
} else if ( 'toElement' in event && 'undefined' !== event.toElement ) { | |
t = event.toElement.localName; // Webkit | |
} | |
// If the target is an img, a, or li, it's a safe item in the menu. |
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
function ihcrs_wp_insert_post_data( $post_data, $postarr ) { | |
// Only on events (I have a function to do this...) | |
if ( ! ihcrs_is_event( $postarr['ID'] ) ){ | |
return $post_data; | |
} | |
// Get the current posts's data. | |
$previous_data = get_post( $postarr['ID'] ); |
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
STATUS=`defaults read com.apple.finder AppleShowAllFiles` | |
if [ $STATUS == TRUE ]; then | |
defaults write com.apple.finder AppleShowAllFiles FALSE | |
else | |
defaults write com.apple.finder AppleShowAllFiles TRUE | |
fi | |
killall Finder |
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
<?php | |
/** | |
* The base configurations of the WordPress. | |
* | |
* This file has the following configurations: MySQL settings, Table Prefix, | |
* Secret Keys, WordPress Language, and ABSPATH. You can find more information | |
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing | |
* wp-config.php} Codex page. You can get the MySQL settings from your web host. | |
* |
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
# Set CLICOLOR if you want Ansi Colors in iTerm2 | |
export CLICOLOR=1 | |
# Set colors to match iTerm2 Terminal Colors | |
export TERM=xterm-256color | |
# Colorful ls | |
alias ls='ls -GFh' | |
# I <3 My Prompt |
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
<?php | |
// Differentiate whether we need to load from | |
// cache or get live results. | |
function gdurl_googapi_cache($s){ | |
// First see if we have cached data (15 seconds?) | |
$gdurl_transient = get_transient( 'gdurl_googapi_cache' ); | |
if( isset($gdurl_transient[$s]) ){ | |
return apply_filters( |
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
<?php | |
// Fix the __FILE__ problem with symlinks. | |
// Now just use ___FILE___ instead of __FILE__ | |
$___FILE___ = __FILE__; | |
if ( isset( $plugin ) ) { | |
$___FILE___ = $plugin; | |
} |