Skip to content

Instantly share code, notes, and snippets.

View paulstelzer's full-sized avatar

Paul Stelzer paulstelzer

View GitHub Profile
@paulstelzer
paulstelzer / test.ts
Created December 31, 2018 09:06
Regex test
// OLD
myRecipe.title = trimString($('.recipe__intro .page-title').text());
// NEW
myRecipe.title = this.getText('.recipe__intro .page-title');
:root {
--ion-color-gold: #ffd700;
--ion-color-gold-rgb: 255, 215, 0;
--ion-color-gold-contrast: #000000;
--ion-color-gold-contrast-rgb: 0, 0, 0;
--ion-color-gold-shade: #e0bd00;
--ion-color-gold-tint: #ffdb1a;
}
.ion-color-gold {
--ion-color-base: var(--ion-color-gold) !important;
@paulstelzer
paulstelzer / start.html
Created September 11, 2018 12:47
Ionic 4 Transparent Header
<ion-header>
<ion-toolbar color="secondary" [class.show-background]="showToolbar">
<ion-buttons slot="start">
<ion-menu-button></ion-menu-button>
</ion-buttons>
<ion-buttons slot="end">
<ion-button>
<ion-icon slot="icon-only" name="logo-facebook"></ion-icon>
</ion-button>
@paulstelzer
paulstelzer / youtube.php
Last active March 25, 2018 10:22
WordPress Change oEmbed of youtube.com Links automatically to youtube-nocookie.com to fulfill the new EU-GDPR
// Add this to your plugin or functions.php file of your theme
// Source: https://gdgts.de/wordpress-youtube-embed/
function youtube_add_nocookie( $cached_html, $url, $attr, $post_id ) {
if ( preg_match('#https?://(www\.)?youtu#i', $url) ) {
return preg_replace(
'#src=(["\'])(https?:)?//(www\.)?youtube\.com#i',
'src=$1$2//$3youtube-nocookie.com',
$cached_html
);