Skip to content

Instantly share code, notes, and snippets.

View capaj's full-sized avatar
🏠
Always working-be it from home or elsewhere

Jiri Spac capaj

🏠
Always working-be it from home or elsewhere
View GitHub Profile
@elitan
elitan / google-tv-netflix-bluetooth-sync-fix.md
Last active August 22, 2026 13:54
Netflix-only Bluetooth lip-sync fix for Google TV Streamer

Fixing Netflix-only Bluetooth lip-sync delay on Google TV Streamer

Short version

On the first Google TV Streamer, Bluetooth headphones were roughly 200–250 ms late in Netflix while YouTube remained in sync. The usual sound settings did not fix it. The same failure and workaround were later reproduced on a second Streamer with different headphones and a different Bluetooth codec.

The evidence pointed to Netflix using Android's tunneled playback path over Bluetooth. On both devices, that path used hardware A/V sync, and the observed behavior was consistent with the headphones' presentation delay not being compensated correctly. Adding Netflix's own platform capability below forced non-tunneled playback over Bluetooth:

"tunnelModeWithBTSetting": "disable"
@hackermondev
hackermondev / writeup.md
Last active May 8, 2026 15:19
How we pwned X (Twitter), Vercel, Cursor, Discord, and hundreds of companies through a supply-chain attack

hi, i'm daniel. i'm a 16-year-old high school senior. in my free time, i hack billion dollar companies and build cool stuff.

about a month ago, a couple of friends and I found serious critical vulnerabilities on Mintlify, an AI documentation platform used by some of the top companies in the world.

i found a critical cross-site scripting vulnerability that, if abused, would let an attacker to inject malicious scripts into the documentation of numerous companies and steal credentials from users with a single link open.

(go read my friends' writeups (after this one))
how to hack discord, vercel, and more with one easy trick (eva)
Redacted by Counsel: A supply chain postmortem (MDL)

@manuel-schoebel
manuel-schoebel / api-log-route.ts
Last active April 18, 2024 08:32
next.js simple logger
import { NextRequest, NextResponse } from 'next/server';
export async function POST(request: NextRequest, res: NextResponse) {
const data = await request.json();
switch (data.level) {
case 'error':
console.error(data);
break;
case 'warn':
console.warn(data);
@mcollina
mcollina / principles.md
Last active May 18, 2023 18:27
Matteo's Technical principles

Matteo Technical Principles

1. Conway’s Law is paramount.

Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization's communication structure.

In order to design a piece of software we need to “design” the team that is going to produce it.

2. Developer Experience is key to productivity

@sindresorhus
sindresorhus / esm-package.md
Last active August 24, 2026 16:29
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@gaelfoppolo
gaelfoppolo / retrieve_fastlane_session.rb
Created February 10, 2021 14:51
Auto-setting FASTLANE_SESSION on CI
lane :retrieve_fastlane_session do
# runs shell
# this needs SPACESHIP_SKIP_2FA_UPGRADE=1 flag
spaceauth_output = `bundle exec fastlane spaceauth`
# regex the output for the value we need
fastlane_session_regex = %r{Pass the following via the FASTLANE_SESSION environment variable:\n(?<session>.+)\n\n\nExample:\n.+}
new_session = nil
if match = spaceauth_output.match(fastlane_session_regex)
# strip out the fancy formatting
@KonradSzwarc
KonradSzwarc / omit.ts
Created August 1, 2020 08:54
Type-safe omit function.
export const omit = <T extends Record<string, unknown>, K extends [...(keyof T)[]]>(
originalObject: T,
keysToOmit: K,
): {
[K2 in Exclude<keyof T, K[number]>]: T[K2];
} => {
const clonedObject = { ...originalObject };
for (const path of keysToOmit) {
delete clonedObject[path];
@aelbore
aelbore / esm-cjs-modules.md
Last active July 9, 2025 00:04
Publish your npm package as ES Module, and backward compatibility CommonJS

Create your library

  • Initialize project npm init -y
  • Create esm module ./src/esm/my-lib.js
    function addNumber(value, value2) {
      return value + value2;
    }
    
    export { addNumber };

Everything I Know About UI Routing

Definitions

  1. Location - The location of the application. Usually just a URL, but the location can contain multiple pieces of information that can be used by an app
    1. pathname - The "file/directory" portion of the URL, like invoices/123
    2. search - The stuff after ? in a URL like /assignments?showGrades=1.
    3. query - A parsed version of search, usually an object but not a standard browser feature.
    4. hash - The # portion of the URL. This is not available to servers in request.url so its client only. By default it means which part of the page the user should be scrolled to, but developers use it for various things.
    5. state - Object associated with a location. Think of it like a hidden URL query. It's state you want to keep with a specific location, but you don't want it to be visible in the URL.