Skip to content

Instantly share code, notes, and snippets.

View issam-seghir's full-sized avatar
🏆

Issam Seghir issam-seghir

🏆
View GitHub Profile
@TonyGravagno
TonyGravagno / zodDefaultInstance.ts
Last active March 21, 2024 09:31
Create a default object from a Zod schema
import { z } from 'zod'
/**
* @summary Function returns default object from Zod schema
* @version 23.05.15.2
* @link https://gist.github.com/TonyGravagno/2b744ceb99e415c4b53e8b35b309c29c
* @author Jacob Weisenburger, Josh Andromidas, Thomas Moiluiavon, Tony Gravagno
* @param schema z.object schema definition
* @param options Optional object, see Example for details
* @returns Object of type schema with defaults for all fields
@astamicu
astamicu / Remove videos from Youtube Watch Later playlist.md
Last active May 19, 2024 11:51
Script to remove all videos from Youtube Watch Later playlist

UPDATED 22.11.2022

It's been two years since the last update, so here's the updated working script as per the comments below.

Thanks to BryanHaley for this.

setInterval(function () {
    video = document.getElementsByTagName('ytd-playlist-video-renderer')[0];

 video.querySelector('#primary button[aria-label="Action menu"]').click();
@darsain
darsain / svg_sprites.md
Last active April 10, 2024 11:15
How to use SVG sprites in img[src] and css backgrounds

To make this work in CSS:

background: url('images.svg#chart');

or img:

<img src="images.svg#chart">
@curran
curran / .block
Last active December 10, 2023 12:48
Download SVG from Data URL
license: mit