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 / CSS-center-horizontally-vertically.css
Last active August 29, 2015 14:00
CSS center horizontally + vertically undefined height
// Translate mixin
// ------------------------------
.translate(@x; @y) {
-webkit-transform: translate(@x, @y);
-ms-transform: translate(@x, @y);
-o-transform: translate(@x, @y);
transform: translate(@x, @y);
}
// Center-align mixin
@Volker-E
Volker-E / HTML5-smallest-valid-page.html
Created April 26, 2014 02:16
Smallest valid HTML5 page
<!DOCTYPE html>
<title>!</title>
@Volker-E
Volker-E / WP-Hinder-Network-Access.php
Created April 10, 2014 05:12
WP Hinder-Network-Access
/* http://posteed.com/internetzugriffe-von-wordpress-blocken/ */
define( 'WP_HTTP_BLOCK_EXTERNAL', true );
<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 / 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 ) {
@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 */