Skip to content

Instantly share code, notes, and snippets.

@waelio
waelio / pwa.ts
Created June 20, 2021 17:00
Push Notifications
/* eslint-disable import/no-duplicates */
/* eslint-disable no-console */
const publicVapidKey = import.meta.env.VITE_VID_PUBLIC
const isClient = (): boolean => Boolean(typeof window !== 'undefined' && 'serviceWorker' in navigator)
const unSubscribe = async() => {
if (isClient) {
const reg = await navigator.serviceWorker.register('worker.js', { scope: '/' })
const subscription = await reg.pushManager.getSubscription()
@DrSensor
DrSensor / Advanced Markdown Tricks.md
Last active March 30, 2024 22:51
Advanced Markdown Tricks

Repository

What Will I Learn?

In general, you will learn some markdown tricks combined with standard HTML tags. In more details what you will learn:

  • Hide-show content
  • Writing codeblocks inside codeblocks
  • Combining and using italic, bold, superscript, subscript, and/or strikethrough
  • Quoting long sentence (using nested blockquotes)