Skip to content

Instantly share code, notes, and snippets.

@littledivy
littledivy / linux-airpods-quality-fix.md
Created July 25, 2024 17:12
Fix bluetooth airpod sound quality on Linux (A2DP)

Fix for airpod sound quality on Linux.

Clear any existing profiles, restart bluetooth and pair the airpod again. This should enable the A2DP sink:

sudo systemctl stop bluetooth
rm -rf /var/lib/bluetooth
sudo systemctl start bluetooth
From f498f86cecc69cf82cb316452f33505204c2df5a Mon Sep 17 00:00:00 2001
From: Divy Srivastava <dj.srivastava23@gmail.com>
Date: Fri, 8 Mar 2024 06:16:46 +0000
Subject: [PATCH] Fix Interceptor being reset by LookupIterator changes
---
src/objects/js-objects.cc | 48 ++++++++++++---------------------------
1 file changed, 14 insertions(+), 34 deletions(-)
diff --git a/src/objects/js-objects.cc b/src/objects/js-objects.cc
diff --git a/include/v8-fast-api-calls.h b/include/v8-fast-api-calls.h
index 6ef950c10f..c2f436f7cc 100644
--- a/include/v8-fast-api-calls.h
+++ b/include/v8-fast-api-calls.h
@@ -258,6 +258,7 @@ class CTypeInfo {
// actual type. It's currently used by the arm64 simulator
// and can be added to the other simulators as well when fast
// calls having both GP and FP params need to be supported.
+ kUint8,
};
const subtle = crypto.subtle;
function generateEcdhPeerKey() {
return subtle.generateKey({ name: "ECDH", namedCurve: "P-256" }, true, [
"deriveBits",
]).then((k) => k.publicKey);
}
const wrappers = [];
const keys = [];
// Refer https://github.com/MierenManz/EventSource
const { webidl } = window.__bootstrap;
const { DOMException } = window.__bootstrap.domException;
const eventSourceInitDict = [
{
key: "withCredentials",
converter: webidl.converters.boolean,
required: true,
@littledivy
littledivy / pst.uwu
Last active February 8, 2021 03:31 — forked from t8/pst.uwu
A Profit-Sharing Token Contract built using uwu.
function handle(state, action) {
let input = action.input
let caller = action.caller
if (input.function == "transfer") {
let target = input.target;
let quantity = input.quantity;
let balances = state.balances;
if (!target) {
return
@littledivy
littledivy / age_of_universe.py
Created January 13, 2021 07:24
Estimating the age of universe as dimension of time using fundamental constants. Based on Paul Dirac's large number hypothesis.
from math import pi, ceil, log10
e = 1.6 * (10**-19)
mE = 9.1 * (10**-31)
mP = 1.67 * (10**-27)
c = 3 * (10**8)
G = 6.67 * (10**-11)
x = (9 * (10**9))
n = (e**4) * (x**2)
d = (mP * (mE ** 2) * (c ** 3) * G)
sudo apt-get purge bcmwl-kernel-source
sudo apt-get install broadcom-sta-dkms
const express = require("express");
const app = express();
const http = require('http');
const fs = require('fs');
app.post("/payload", (req, res, next) => {
getRelease(req.body)
});
function getRelease(payload) {

Keybase proof

I hereby claim:

  • I am divy-work on github.
  • I am divyy (https://keybase.io/divyy) on keybase.
  • I have a public key ASASFtprB7HWd8TZe0XOm4WETdHIuKNaEa5Z00ENPc7BmAo

To claim this, I am signing this object: