Skip to content

Instantly share code, notes, and snippets.

@Abdallatif
Abdallatif / amplify-previews-bot.md
Created May 11, 2022 21:55
AWS Amplify Previews Discord Bot
@Abdallatif
Abdallatif / remix-field.md
Created November 23, 2021 21:57
Remix Field

This component was inspired by Formik and the jokes demo from Remix. This is just an experiment it's not meant for production use (yet).

interface FormActionData {
  fieldErrors?: Record<string, string>;
  fields?: Record<string, string>;
}

interface Field {
  name: string;
@Abdallatif
Abdallatif / youtube-list-cleanup.md
Last active November 13, 2021 15:48
Add a delete button for videos in a youtube playlist

This is a script that adds a delete button to clean up a playlist (Watch Later/Liked videos ...etc) so you can delete videos quickly without opening a menu.

Copy the following code and paste it in the devtools console after you open the playlist page:

const videos = document.querySelectorAll("ytd-playlist-video-renderer");

for (const video of videos) {
	const deleteButton = document.createElement("button")
	deleteButton.innerHTML = `x`;