Skip to content

Instantly share code, notes, and snippets.

Avatar

Tom Nguyen mrtechnique

View GitHub Profile
@mrtechnique
mrtechnique / gist:5f377bd3a5c794dda434cd2ed693f09a
Last active Jul 24, 2018
WordPress code needed in wp-config.php to display errors
View gist:5f377bd3a5c794dda434cd2ed693f09a
// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
// Disable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
@mrtechnique
mrtechnique / url-parameters-to-wordpress-shortcodes.txt
Last active Jul 11, 2018
Generating WordPress Shortcodes from URL Parameters
View url-parameters-to-wordpress-shortcodes.txt
//1. CAPTURE FIRST NAME FROM URL
function aa_first_name() {
$aa_first_name = $_GET["fname"];
if (isset($aa_first_name)) {
$aa_first_name = ucfirst($aa_first_name);
return $aa_first_name;
} else {
return '';
}
}
View gist:5be7ee5cf3ca4602a2546ee73f49566e
tell application "System Events"
set myList to (name of every process)
end tell
if (myList contains "Google Chrome") is false then
do shell script "open -a Google\\ Chrome --new --args -incognito"
else
tell application "Google Chrome"
activate
tell application "System Events" to keystroke "n" using {command down, shift down}
open location "https://google.com/search?q=keyword+number+1"
@mrtechnique
mrtechnique / gist:3a5284330720ae1ee475c9c712bde7fe
Created Nov 15, 2017
Remove CSS and JS Versioning in WordPress
View gist:3a5284330720ae1ee475c9c712bde7fe
function remove_cssjs_ver( $src ) {
if( strpos( $src, '?ver=' ) )
$src = remove_query_arg( 'ver', $src );
return $src;
}
add_filter( 'style_loader_src', 'remove_cssjs_ver', 10, 2 );
View gist:5f88cdb007eb167f032ff4bf5e92ffed
<strong>({Payment Amount:5} + .3) / (1 - .029)</strong>