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 | |
/* | |
Author: Hans2103 | |
credit: Jim Westergren, Jeedo Aquino & Flynsarmy | |
File: index-with-redis.php | |
Updated: 2013-05-27 | |
This is a redis caching system for Wordpress based on Redis connection using PHPRedis. | |
https://github.com/nicolasff/phpredis |
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 | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
//* Customize the credits | |
add_filter( 'genesis_footer_creds_text', 'sp_footer_creds_text' ); | |
function sp_footer_creds_text() { | |
echo '<div class="creds"><p>'; | |
echo 'Copyright © '; | |
echo date('Y'); | |
echo ' · <a href="http://mydomain.com">My Custom Link</a> · Built on the <a href="http://www.studiopress.com/themes/genesis" title="Genesis Framework">Genesis Framework</a>'; |
There are two ways of installing meld on osx (May 2023), using brew
and .dmg
package (from @yousseb). Since I found https://yousseb.github.io/meld/, I've installed it with .dmg
package, but having macOS Ventura Version 13.4 (22F66)
in place, it's not even starting for me. So I tried brew
installation, and the application is working as expected, including symlink to start it from the terminal.
Using brew formulae: https://formulae.brew.sh/cask/meld
brew install --cask meld
# set meld as your default git mergetool
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
# with AJAX withCredentials=false (cookies NOT sent) | |
Header always set Access-Control-Allow-Origin "*" | |
Header always set Access-Control-Allow-Methods "POST, GET, PUT, OPTIONS, PATCH, DELETE" | |
Header always set Access-Control-Allow-Headers "X-Accept-Charset,X-Accept,Content-Type" | |
RewriteEngine On | |
RewriteCond %{REQUEST_METHOD} OPTIONS | |
RewriteRule ^(.*)$ $1 [R=200,L,E=HTTP_ORIGIN:%{HTTP:ORIGIN}]] | |
# with AJAX withCredentials=true (cookies sent, SSL allowed...) | |
SetEnvIfNoCase ORIGIN (.*) ORIGIN=$1 |
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 | |
add_action( 'wp_enqueue_scripts', 'gs_calendarizeit_remove_scripts', 999 ); | |
function gs_calendarizeit_remove_scripts() { | |
if ( gs_is_field_trip() || 'events' === get_post_type( get_the_ID() ) ) return; | |
$scripts = array( | |
'calendarize', | |
'jquery-easing', | |
'rrecur-parser', |
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 | |
/*-----------------------------------------------------------------------------------*/ | |
/* Clean them stylesheet <link> tags | |
/*-----------------------------------------------------------------------------------*/ | |
function clean_style_tag($input) { | |
preg_match_all("!<link rel='stylesheet'\s?(id='[^']+')?\s+href='(.*)' type='text/css' media='(.*)' />!", $input, $matches); | |
// Display media if it's print | |
$media = $matches[3][0] === 'print' ? ' media="print"' : ''; | |
return '<link rel="stylesheet" href="' . $matches[2][0] . '"' . $media . '>' . "\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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |