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
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
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
<IfModule mod_expires.c> | |
ExpiresActive On | |
ExpiresByType text/html "access plus 2 hours " | |
ExpiresByType text/xml "access plus 2 hours" | |
ExpiresByType image/gif "access plus 3 weeks" | |
ExpiresByType image/jpg "access plus 2 weeks" | |
ExpiresByType image/png "access plus 3 weeks" | |
ExpiresByType video/quicktime "access plus 2 months" | |
ExpiresByType audio/mpeg "access plus 2 months" | |
ExpiresByType application/pdf "access plus 2 weeks" |
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
# | |
# Sources: | |
# http://stackoverflow.com/questions/7704624/how-can-i-use-gzip-compression-for-css-and-js-files-on-my-websites | |
# http://codex.wordpress.org/Output_Compression | |
# http://www.perun.net/2009/06/06/wordpress-websites-beschleuinigen-4-ein-zwischenergebnis/#comment-61086 | |
# http://www.smashingmagazine.com/smashing-book-1/performance-optimization-for-websites-part-2-of-2/ | |
# http://gtmetrix.com/configure-entity-tags-etags.html | |
# http://de.slideshare.net/walterebert/die-htaccessrichtignutzenwchh2014 | |
# http://de.slideshare.net/walterebert/mehr-performance-fr-wordpress | |
# https://andreashecht-blog.de/4183/ |
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
class Widget_Setup | |
{ | |
public $widget_class = ''; | |
public $admin_styles = array(); | |
public $admin_scripts = array(); | |
public $front_styles = array(); | |
public $front_scripts = array(); | |
public $script_defaults = array( | |
'handle' => '', |
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
<!doctyp html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Get Latitude and Longitude</title> | |
<script src="http://maps.google.com/maps/api/js?libraries=places®ion=uk&language=en&sensor=true"></script> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> | |
</head> | |
<body> |
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 | |
session_start(); | |
add_filter( 'posts_orderby', 'randomise_with_pagination' ); | |
function randomise_with_pagination( $orderby ) { | |
if( is_front_page() ) { | |
// Reset seed on load of initial archive page |
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
u = location.href; | |
t = "takuya-hateblo-22"; | |
a = (function(url, tag) { | |
asin = (function(url) { | |
if (r = url.match(/gp\/product\/([^\/]+)/)) { | |
return r[1]; | |
} else if (r = url.match(/dp\/([^\/]+)/)) { | |
return r[1]; | |
} else { | |
return; |
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
/** | |
* How to link into the WordPress Customizer | |
*/ | |
Simple Link: | |
<a href="<?php echo esc_url( admin_url( 'customize.php' ) ); ?>">Link to Customizer</a> | |
Link to Panel: | |
$query['autofocus[panel]'] = 'nav_menus'; |
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
<IfModule mod_setenvif.c> | |
<IfModule mod_headers.c> | |
<FilesMatch "\.(cur|gif|ico|jpe?g|png|svgz?|webp)$"> | |
SetEnvIf Origin ":" IS_CORS | |
Header set Access-Control-Allow-Origin "*" env=IS_CORS | |
</FilesMatch> | |
</IfModule> | |
</IfModule> | |
<IfModule mod_headers.c> | |
<FilesMatch "\.(eot|otf|ttc|ttf|woff)$"> |
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 | |
//======================================================================================================= | |
// Create new webhook in your Discord channel settings and copy&paste URL | |
//======================================================================================================= | |
$webhookurl = "YOUR_WEBHOOK_URL"; | |
//======================================================================================================= | |
// Compose message. You can use Markdown | |
// Message Formatting -- https://discordapp.com/developers/docs/reference#message-formatting |
OlderNewer