Skip to content

Instantly share code, notes, and snippets.

View zipavlin's full-sized avatar

Žiga Pavlin zipavlin

  • Futura DDB
  • Ljubljana, Slovenia
View GitHub Profile
@zipavlin
zipavlin / gist:4b4fed38c777cea66f7409d2b924a4bf
Created September 29, 2025 13:40
Esphome zigbee multisensor
esphome:
name: multisensor-kitchen
on_boot:
priority: -100
then:
- light.turn_on: light_internal
- lvgl.page.show: page_blank
- delay: 1s
- light.turn_off: light_internal
@zipavlin
zipavlin / cookieNotice
Created November 6, 2018 10:57
A helper class for displaying and hiding cookie notice
/**
* Cookie Notice helper
* @param name
* @constructor
*/
function CookieNotice (name) {
this.name = name;
this.visible = true;
this.consent = false;
this.events = [];
@zipavlin
zipavlin / gdpr_gtm.js
Last active December 7, 2020 11:57
GDPR cookie helper for Google Tag Manager
/**
* GDPR cookie helper for Google Tag Manager
* Helper uses default dataLayer as GTM array
* @param name - name of cookie
* @param options - all possible options for cookies, used in addAll
* @constructor
*/
function GdprCookie (name, options) {
this.name = name;
this.variables = [];
@zipavlin
zipavlin / cookieconsent.js
Last active July 19, 2018 06:42
Create cookie concent with scripts loading after user's confirmation or cookie.
/*
use as
var cookie = new CookieConsent({
wrapID: "cookie", // id of cookie notice element
okID: "c-ok", // id of confirm btn
cancelID: "c-cancel", // id of cancel btn
cookieName: "cookie_consent", // name of cookie
scripts: [] // array of scripts. Either pass script url string or js function
});
*/