Skip to content

Instantly share code, notes, and snippets.

View artpar's full-sized avatar
🏠
Working from home

Parth Mudgal artpar

🏠
Working from home
View GitHub Profile
@artpar
artpar / hackernews-transparent.md
Created August 16, 2025 06:10
Test gist with transparent DOM
  • {"attributes":{"class":"athing submission","id":"44919891"},"boundingRect":{"bottom":74.85714530944824,"height":22.000001907348633,"left":0,"right":686.857177734375,"top":52.85714340209961,"width":686.857177734375,"x":0,"y":52.85714340209961},"innerHTML":"<td align="right" valign="top" class="title"><span class="rank">1.<td valign="top" class="votelinks"><a id="up_44919891" href="vote?id=44919891&how=up&goto=news"><div class="votearrow" title="upvote"><td class="title"><span class="titleline"><a href="https://putty.software/\">PuTTY has a new website<span class="sitebit comhead"> (<a href="from?site=putty.software"><span class="sitestr">putty.software)","tagName":"TR","textContent":"1.PuTTY has a new website (putty.software)"}
  • {"attributes":{"class":"athing submission","id":"44919647"},"boundingRect":{"bottom":116.42857551574707,"height":22.000001907348633,"left":0,"right":686.857177734375,
  • {"attributes":{"class":"athing submission","id":"44911423"},"boundingRect":{"bottom":91.90178680419922,"height":39.04464340209961,"left":0,"right":448.5714416503906,"top":52.85714340209961,"width":448.5714416503906,"x":0,"y":52.85714340209961},"innerHTML":"<td align="right" valign="top" class="title"><span class="rank">1.<td valign="top" class="votelinks"><a id="up_44911423" href="vote?id=44911423&how=up&goto=news"><div class="votearrow" title="upvote"><td class="title"><span class="titleline"><a href="https://www.josefprusa.com/articles/open-hardware-in-3d-printing-is-dead/\">Open hardware desktop 3D printing is dead – you just don't know it yet<span class="sitebit comhead"> (<a href="from?site=josefprusa.com"><span class="sitestr">josefprusa.com)","tagName":"TR","textContent":"1.Open hardware desktop 3D printing is dead – you just don't know it yet (josefprusa.com)"}
  • {"attributes":{"class
@artpar
artpar / hackernews-transparent-1-1755265579911-213838-2ncyc32pl-1y7pyoqjk.md
Created August 15, 2025 13:46
Test gist with transparent DOM - Instance 1
  • {"attributes":{"class":"athing submission","id":"44911423"},"boundingRect":{"bottom":91.90178680419922,"height":39.04464340209961,"left":0,"right":448.5714416503906,"top":52.85714340209961,"width":448.5714416503906,"x":0,"y":52.85714340209961},"innerHTML":"<td align="right" valign="top" class="title"><span class="rank">1.<td valign="top" class="votelinks"><a id="up_44911423" href="vote?id=44911423&how=up&goto=news"><div class="votearrow" title="upvote"><td class="title"><span class="titleline"><a href="https://www.josefprusa.com/articles/open-hardware-in-3d-printing-is-dead/\">Open hardware desktop 3D printing is dead – you just don't know it yet<span class="sitebit comhead"> (<a href="from?site=josefprusa.com"><span class="sitestr">josefprusa.com)","tagName":"TR","textContent":"1.Open hardware desktop 3D printing is dead – you just don't know it yet (josefprusa.com)"}
  • {"attributes":{"class
@artpar
artpar / hackernews-transparent.md
Created August 15, 2025 13:45
Test gist with transparent DOM
  • {"attributes":{"class":"athing submission","id":"44911423"},"boundingRect":{"bottom":87.90178680419922,"height":39.04464340209961,"left":0,"right":448.5714416503906,"top":48.85714340209961,"width":448.5714416503906,"x":0,"y":48.85714340209961},"innerHTML":"<td align="right" valign="top" class="title"><span class="rank">1.<td valign="top" class="votelinks"><a id="up_44911423" href="vote?id=44911423&how=up&goto=news"><div class="votearrow" title="upvote"><td class="title"><span class="titleline"><a href="https://www.josefprusa.com/articles/open-hardware-in-3d-printing-is-dead/\">Open hardware desktop 3D printing is dead – you just don't know it yet<span class="sitebit comhead"> (<a href="from?site=josefprusa.com"><span class="sitestr">josefprusa.com)","tagName":"TR","textContent":"1.Open hardware desktop 3D printing is dead – you just don't know it yet (josefprusa.com)"}
  • {"attributes":{"class
  • {"attributes":{"class":"athing submission","id":"44911423"},"boundingRect":{"bottom":87.90178680419922,"height":39.04464340209961,"left":0,"right":448.5714416503906,"top":48.85714340209961,"width":448.5714416503906,"x":0,"y":48.85714340209961},"innerHTML":"<td align="right" valign="top" class="title"><span class="rank">1.<td valign="top" class="votelinks"><a id="up_44911423" href="vote?id=44911423&how=up&goto=news"><div class="votearrow" title="upvote"><td class="title"><span class="titleline"><a href="https://www.josefprusa.com/articles/open-hardware-in-3d-printing-is-dead/\">Open hardware desktop 3D printing is dead – you just don't know it yet<span class="sitebit comhead"> (<a href="from?site=josefprusa.com"><span class="sitestr">josefprusa.com)","tagName":"TR","textContent":"1.Open hardware desktop 3D printing is dead – you just don't know it yet (josefprusa.com)"}
  • {"attributes":{"class
  • {"attributes":{"class":"athing submission","id":"44911423"},"boundingRect":{"bottom":87.90178680419922,"height":39.04464340209961,"left":0,"right":448.5714416503906,"top":48.85714340209961,"width":448.5714416503906,"x":0,"y":48.85714340209961},"innerHTML":"<td align="right" valign="top" class="title"><span class="rank">1.<td valign="top" class="votelinks"><a id="up_44911423" href="vote?id=44911423&how=up&goto=news"><div class="votearrow" title="upvote"><td class="title"><span class="titleline"><a href="https://www.josefprusa.com/articles/open-hardware-in-3d-printing-is-dead/\">Open hardware desktop 3D printing is dead – you just don't know it yet<span class="sitebit comhead"> (<a href="from?site=josefprusa.com"><span class="sitestr">josefprusa.com)","tagName":"TR","textContent":"1.Open hardware desktop 3D printing is dead – you just don't know it yet (josefprusa.com)"}
  • {"attributes":{"class
  • {"attributes":{"class":"athing submission","id":"44911423"},"boundingRect":{"bottom":87.90178680419922,"height":39.04464340209961,"left":0,"right":448.5714416503906,"top":48.85714340209961,"width":448.5714416503906,"x":0,"y":48.85714340209961},"innerHTML":"<td align="right" valign="top" class="title"><span class="rank">1.<td valign="top" class="votelinks"><a id="up_44911423" href="vote?id=44911423&how=up&goto=news"><div class="votearrow" title="upvote"><td class="title"><span class="titleline"><a href="https://www.josefprusa.com/articles/open-hardware-in-3d-printing-is-dead/\">Open hardware desktop 3D printing is dead – you just don't know it yet<span class="sitebit comhead"> (<a href="from?site=josefprusa.com"><span class="sitestr">josefprusa.com)","tagName":"TR","textContent":"1.Open hardware desktop 3D printing is dead – you just don't know it yet (josefprusa.com)"}
  • {"attributes":{"class
@artpar
artpar / hackernews-transparent.md
Created August 15, 2025 13:40
Test gist with transparent DOM
  • {"attributes":{"class":"athing submission","id":"44911423"},"boundingRect":{"bottom":87.90178680419922,"height":39.04464340209961,"left":0,"right":448.5714416503906,"top":48.85714340209961,"width":448.5714416503906,"x":0,"y":48.85714340209961},"innerHTML":"<td align="right" valign="top" class="title"><span class="rank">1.<td valign="top" class="votelinks"><a id="up_44911423" href="vote?id=44911423&how=up&goto=news"><div class="votearrow" title="upvote"><td class="title"><span class="titleline"><a href="https://www.josefprusa.com/articles/open-hardware-in-3d-printing-is-dead/\">Open hardware desktop 3D printing is dead – you just don't know it yet<span class="sitebit comhead"> (<a href="from?site=josefprusa.com"><span class="sitestr">josefprusa.com)","tagName":"TR","textContent":"1.Open hardware desktop 3D printing is dead – you just don't know it yet (josefprusa.com)"}
  • {"attributes":{"class
@artpar
artpar / random-programming-content.md
Created August 15, 2025 13:04
Random programming snippets, quotes, and tech tips

Random Programming Snippets & Ideas

Quick Sort Implementation in JavaScript

function quickSort(arr) {
    if (arr.length <= 1) return arr;
    
    const pivot = arr[Math.floor(arr.length / 2)];
    const left = arr.filter(x => x < pivot);
    const middle = arr.filter(x => x === pivot);
@artpar
artpar / random-tech-content.md
Created August 15, 2025 12:34
Random tech content with code snippets and facts

Random Tech Thoughts

Here are some random thoughts and code snippets:

JavaScript Array Shuffle

function shuffleArray(array) {
    for (let i = array.length - 1; i > 0; i--) {
        const j = Math.floor(Math.random() * (i + 1));
        [array[i], array[j]] = [array[j], array[i]];