Skip to content

Instantly share code, notes, and snippets.

<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 1 month"
# CSS
ExpiresByType text/css "access plus 2 days"
# Data interchange
ExpiresByType application/atom+xml "access plus 1 hour"
ExpiresByType application/rdf+xml "access plus 1 hour"
<?php
$servername = "servername";
$database = "dxxxxxxx";
$username = "dxxxxxxx";
$password = "password";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
.sticky-row {
position:sticky;
position:-webkit-sticky;
top:0;
z-index:2;
}
@zartgesotten
zartgesotten / clipping.html
Created December 19, 2018 09:06
Mit diesem Mittel können Bilder auch auf ungewöhnliche Formen "zugeschnitten" werden. Funktioniert leider nicht in IE (11) Die SVG-Shape kann einfach mit einem Vektor-Programm erzeugt werden.
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>CSS &amp; SVG Clipping Demo #3</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
# Block User ID Phishing Requests
<IfModule mod_rewrite.c>
RewriteCond %{QUERY_STRING} ^author=([0-9]*)
RewriteRule .* http://example.com/? [L,R=302]
</IfModule>
if ( ! is_admin() ) {
add_filter(
'query_vars',
function ( $public_query_vars ) {
foreach ( array( 'author', 'author_name' ) as $var ) {
$key = array_search( $var, $public_query_vars );
if ( false !== $key ) {
unset( $public_query_vars[$key] );
}
li.menu-item > a > span {
position: relative;
}
li.menu-item > a > span:after {
position: absolute;
bottom: -30%;
left: 0;
width: 100%;
height: 3px;
/* ---------------------------------------------------------------------
Module: UABB Info Banner
Requirement: You must have equal column heights.
Requirement: Should not have a height set in the individual modules.
------------------------------------------------------------------------ */
.fl-module-info-banner {
display: flex;
height: 100%;
}
add_image_size( 'admin-list-thumb', 80, 80, false );
// add featured thumbnail to admin post columns
function wpcs_add_thumbnail_columns( $columns ) {
$columns = array(
'cb' => '<input type="checkbox" />',
'featured_thumb' => 'Thumbnail',
'title' => 'Title',
'author' => 'Author',
'categories' => 'Categories',