Skip to content

Instantly share code, notes, and snippets.

View praveenpuglia's full-sized avatar
👨‍💻
Hyderabad, India

Praveen Puglia praveenpuglia

👨‍💻
Hyderabad, India
View GitHub Profile
@praveenpuglia
praveenpuglia / 0001-Prototype-ozone-wayland-add-support-for-xx-pip-v1.patch
Created October 14, 2026 18:03
Chromium xx-pip-v1 (Wayland picture-in-picture) prototype rebased onto main b35384d9ce, plus popup-parent and move/resize fixes. Tested on KWin 6.7.5.
From be10466f68b1013e928987d28bff42c9491c256c Mon Sep 17 00:00:00 2001
From: Nick Yamane <nickdiego@igalia.com>
Date: Wed, 14 Oct 2026 18:06:40 +0530
Subject: [PATCH 1/4] [Prototype] ozone/wayland: add support for xx-pip-v1
Cherry-picked from https://chromium-review.googlesource.com/c/chromium/src/+/6471703 (PS2)
by Nick Yamane, rebased by hand onto b35384d9ce.
Bug: 409717081
---
@praveenpuglia
praveenpuglia / 50-local-settings.conf
Last active October 8, 2026 14:53
Dell Pro Max 16 (MA16250) webcam on Fedora 44 / kernel 7.2: Intel IPU6 HAL + privacy LED fix
[Service]
EnvironmentFile=/etc/v4l2-relayd-icamerasrc.env
@praveenpuglia
praveenpuglia / outline.custom.css
Last active June 15, 2023 11:27
Stylebot custom CSS for Outline Wiki
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,700&display=swap');
body {
--inter: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
--ibm-plex-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
font-family: var(--inter);
}
/* The title */
[class^='EditableTitle__Title'] {
@praveenpuglia
praveenpuglia / data.json
Created September 14, 2022 10:33
Mock Smallcases Data
[
{
"name": "Assistix",
"manager": "Fuelton",
"cagr": 3.720808713691426,
"createdDate": 1586810446274,
"avatar": "https://picsum.photos/id/133/200",
"volatility": "high",
"minInvestmentAmount": 49162.31361884028,
"description": "Lorem tempor consectetur minim laboris incididunt adipisicing voluptate Lorem ut eiusmod.",
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Filtering vs Splicing</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@praveenpuglia
praveenpuglia / test_data.json
Created September 13, 2019 06:59
D3 Cluster Test Data
{
"name": "Issues",
"children": [
{
"name": "Word 1",
"children": [
{
"value": 8052,
"name": "Word 1"
},
@praveenpuglia
praveenpuglia / vue-apollo.ts
Created May 31, 2019 09:22
vue-apollo.ts configuration
import Vue from 'vue';
import VueApollo from 'vue-apollo';
import {
createApolloClient,
restartWebsockets
} from 'vue-cli-plugin-apollo/graphql-client';
import ApolloClient from 'apollo-client';
import { InMemoryCache } from 'apollo-cache-inmemory';
import { SubscriptionClient } from 'subscriptions-transport-ws';
import router from '@/router';
@praveenpuglia
praveenpuglia / playAudioAsBlobViaAjax.js
Last active March 5, 2025 09:02
Download Audio from AJAX and Play as Blob
// Updated on 16th May, 2024 based on @chamie's suggestion.
const response = await fetch("http://path/to/audio.wav");
const data = await response.arrayBuffer();
const blob = new Blob([data], { type: "audio/wav" });
const blobUrl = URL.createObjectURL(blob);
const audio = new Audio();
audio.src = blobUrl;
audio.controls = true;
document.body.appendChild(audio);
@praveenpuglia
praveenpuglia / javascript-deep-flatten.js
Created July 27, 2018 14:37
Deep flatten a JavaScript array using Array.prototype.reduce
function flatten(array) {
return array.reduce( (acc, e) => {
if(Array.isArray(e)) {
// if the element is an array, fall flatten on it again and then take the returned value and concat it.
return acc.concat(flatten(e));
} else {
// otherwise just concat the value.
return acc.concat(e);
}
}, [] ) // initial value for the accumulator is []
@praveenpuglia
praveenpuglia / javascript-qiucksort.js
Created July 26, 2018 18:19
Quick Sort implemented in JS
function quickSort(array, left = 0, right = array.length - 1) {
console.log("CALLED");
let partitionIndex;
let pivotIndex;
if(left < right) {
pivotIndex = right;
partitionIndex = partition(array, left, right, pivotIndex);
quickSort(array, left, partitionIndex - 1);
quickSort(array, partitionIndex + 1, right);
}