Skip to content

Instantly share code, notes, and snippets.

View Volker-E's full-sized avatar

Volker E. Volker-E

View GitHub Profile
@Volker-E
Volker-E / bash
Created March 30, 2020 20:41
OOUI loc
# 50k+ Ruby tests autogenerated './tests/JSPHP-suite.json' is still part of results
grunt clean && rm -rf vendor/ node_modules/ package-lock.json composer.lock && find . \( -name '*.*' ! -iname '.*' \) -not -path './i18n/*' -not -path './.git/*' | xargs wc -l
@Volker-E
Volker-E / CSS-media-query-HDPi-Displays.css
Last active April 23, 2018 07:05
CSS Media Query HDPi-Displays<br />For HDPi Displays beginning with Nexus 7 (2012)
@media only screen
and (-webkit-min-device-pixel-ratio: 1.3),
only screen
and (min--moz-device-pixel-ratio: 1.3),
only screen
and (-o-min-device-pixel-ratio: 2.6/2), /* returns 1.3, see also Dev.Opera */
only screen
and (min-device-pixel-ratio: 1.3),
only screen
and (min-resolution: 160dpi), /* alternatively 124.8dpi, see http://www.brettjankord.com/2012/11/28/cross-browser-retinahigh-resolution-media-queries/ */
@Volker-E
Volker-E / JS-add-to-bookmarks.js
Last active December 26, 2017 09:21
Add to Bookmarks cross-browser
/* ... Bookmark this page ... */
var $pageFav = $('.page-favor'), // li.page-favor
$pageFavLink = $pageFav.find('a');
if ( window.sidebar || 'AddFavorite' in window.external || window.opera ) {
$pageFav.show();
}
/* Source: http://calisza.wordpress.com/2008/11/03/javascript-jquery-bookmark-script/ */
// add a 'rel' attrib if Op 7+ && Fx >= 23
if ( window.opera || window.sidebar ) {
$languages = pll_the_languages( array( 'raw' => 1 ) );
$current = array_filter( $languages, create_function( '$v', 'return (bool) $v["current_lang"];' ) );
$current = reset( $current );
printf( '<ul id="nav--lang__menu" class="nav--lang__menu">
<li>
<a href="#" class="lang--on lang-item--%s">%s</a>
<ul class="lang__sel">',
$current['slug'], $current['name'] );
<IfModule mod_headers.c>
<FilesMatch "\.(png|jpg|jpeg|gif)$">
Header append Cache-Control "public, no-transform"
</FilesMatch>
</IfModule>
@Volker-E
Volker-E / .htaccess
Created January 14, 2014 01:50 — forked from meaku/.htaccess
# HTTP(S) Stuff
# Redirect all users except IE 5-8 & Android < 4 to HTTPS
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{HTTP_USER_AGENT} !MSIE\ [5-8]
RewriteCond %{HTTP_USER_AGENT} !Android.*(Mobile)?\ [0-3]
RewriteRule (.*) https://%{HTTP_HOST}/$1 [L]
ul {
list-style: none;
position: relative;
margin: 0;
padding: 0;
}
li {
padding-left: 1.5em;
}
@Volker-E
Volker-E / CSS-selection--text-shadow-none.css
Last active December 28, 2015 13:38
/* Don't show shadows when selecting text */
/* Don't show shadows when selecting text */
::-moz-selection { text-shadow: none; }
::selection { text-shadow: none; }
body {
font: 100%/1.25 sans-serif;
color: #636363;
padding: 1em;
}
table {
width: 100%;
margin: 0;
border-top: 1px solid #e4e2e8;
/* Add the desktop-hidden class to any HTML tag that contains mobile specific content */
.desktop-hidden {
*display:none !important; /* IE6-7 */
}
@media \0 screen {
.desktop-hidden {
display:none !important; /* IE8 only */