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 if ( is_singular() || is_front_page() ) { ?> | |
<meta name="twitter:card" content="summary" /> | |
<meta name="twitter:creator" content="@YOUR-TWITTER-NAME" /> | |
<meta name="twitter:url" content="<?php the_permalink() ?>" /> | |
<meta name="twitter:title" content="<?php do_action('wpseo_the_title') ?>" /> | |
<meta name="twitter:description" content="<?php do_action('wpseo_the_desc') ?>" /> | |
<meta property="og:title" content="<?php do_action('wpseo_the_title') ?>"> | |
<meta property="og:type" content="article"> | |
<meta property="og:url" content="<?php the_permalink() ?>"> |
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
if(navigator.userAgent.match(/(iPad|iPhone|iPod touch)/i) | |
&& !navigator.userAgent.match(/(iPad|iPhone|iPod touch);.*CPU.*OS 7_\d/i)){ | |
$('select.your_special_class option[disabled]').remove(); | |
} |
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
/** normale lange Schreibweise **/ | |
if(omv){ | |
$('select option[value="x"]').remove(); | |
}else{ | |
$('select option[value="x"]').attr('disabled','disabled'); | |
} | |
/** wesentlich kürzere Schreibweise **/ | |
omv ? $('select option[value="x"]').remove() : $('select option[value="x"]').attr('disabled','disabled'); |
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 | |
$image_arr=array('path1.png', 'path2.png', 'path3.png'); | |
echo gd_gen_image($image_arr); | |
function gd_gen_image($arr){ | |
$base = imagecreatetruecolor(913, 500); | |
$color = imagecolorallocatealpha($base, 0, 0, 0, 127); | |
imagefill($base, 0, 0, $color); |
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
Redirectmatch 301 ^/song((s)|(writer))(\/){0,1}(\.htm){0,1}(l){0,1}$ http://tld/songs.html |
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
tcpdump -i [interface, en0 is ethernet, en1 is wireless] |
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
if(console!="undefined"){console.log('myLog');} |
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
#this redirects all your old stuff to the main site of the new domain | |
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^old-domain.com [NC] | |
RewriteRule ^(.*)$ http://new-domain.com/ [L,R=301] | |
RewriteCond %{HTTP_HOST} ^www.old-domain.com [NC] | |
RewriteRule ^(.*)$ http://new-domain.com/ [L,R=301] | |
#this redirects all your old stuff to the new domain, leaving all deep urls like before | |
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^old-domain.com [NC] |
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
// if you are using no caching headers in your iframe sources, so you 'll always get an "filled" iframe. This does kick your layout sometimes. | |
// this is how to coollapse such iframes: | |
if($("#iframeid").contents().find("p").length) { | |
$('#iframeid').css('display', 'none'); | |
} | |
// this is how to kill all caches in the iframe source | |
// <head> | |
// <meta http-Equiv="Cache-Control" Content="no-cache"> |
OlderNewer