Skip to content

Instantly share code, notes, and snippets.

View prakhartiwari0's full-sized avatar
🌱
Developing a Developer

Prakhar Tiwari prakhartiwari0

🌱
Developing a Developer
View GitHub Profile
@tkshill
tkshill / blog.md
Last active September 10, 2024 07:55
A Starter Guide To Open Source Maintenance

Introduction

This document serves as a way for this project's maintainers to document their process of getting their repository ready for the 2020 Hacktoberfest alongside the Virtual Coffee Hacktoberfest Initiative. We also hope this project continues beyond just Hacktoberfest, and so we thought it best to collect all the knowledge, resources and learnings we pick up along the way in one central place, both for our own reflection, as well as sometimes that others can use to create welcoming and valuable spaces for their own open source contributions.

While we will try as best as possible to create a body of knowledge that is accessible and understandable to everyone who finds it, we hope you understand that this may not always be as comprehensive, current or exact as you may want to be. The language will be more candid that you might find in your typical technical documentation, and YMMV _(Your

@sstur
sstur / dom-to-json.js
Last active October 8, 2023 04:17
Stringify DOM nodes using JSON (and revive again)
function toJSON(node) {
let propFix = { for: 'htmlFor', class: 'className' };
let specialGetters = {
style: (node) => node.style.cssText,
};
let attrDefaultValues = { style: '' };
let obj = {
nodeType: node.nodeType,
};
if (node.tagName) {