Skip to content

Instantly share code, notes, and snippets.

View d-kja's full-sized avatar
🦉
Losing my sh- I mean... learning...

Nicolas d-kja

🦉
Losing my sh- I mean... learning...
View GitHub Profile
@d-kja
d-kja / vscode-config.json
Last active February 2, 2024 12:52
VS Code config
{
"breadcrumbs.enabled": false,
"window.commandCenter": false,
"window.menuBarVisibility": "compact",
"window.zoomLevel": 1,
"update.mode": "start",
"update.showReleaseNotes": false,
@d-kja
d-kja / html-tags.md
Last active December 31, 2022 17:15
Useful html base

HTML

Basic structure

  • header
    • nav
  • main
    • article
    • section
    • form
  • footer
@d-kja
d-kja / intercept-response-body-puppeteer.ts
Last active June 6, 2024 20:53
intercept-response-body-puppeteer
const client = await page.target().createCDPSession();
await client.send("Fetch.enable", {
patterns: [{ requestStage: "Response" }]
});
client.on('Fetch.requestPaused', async parameters => {
const { requestId } = parameters
const responseCdp = await client.send("Fetch.getResponseBody", { requestId });
@d-kja
d-kja / try.ts
Created August 21, 2024 18:52 — forked from asleepace/try.ts
A simple extension for TypeScript which enables the `.try(args)` method on functions. This works for both normal & async functions, and reduces a lot of boilerplate.
// Try.ts
// By Colin Teahan
// August 14th, 2024
//
// This TypeScript file enables usage of the .try() method which will return a result tuple of [T?, Error?]
// from any function or async function. This works by defining a new property on the global Object.prototype
// and then do some type-fu.
//
// Example usage:
// https://www.typescriptlang.org/play/?target=99#code/MYewdgziA2CmB0w4EMBOAKAlAKGwejwAJCAVVAT3gBcJ8jCAhcwgYRgEsxTZkALZMHWIBBAK4BzURCqEAjABYqvADSEATAAY18ukNK92EUuQAOsAMrBU7EzIBm7OIVhhkAIzhGpycbEIg7QiU-agosQgBbWCUQABNCAHcDYF5Ex2hCVGjRVC5kTNgIUWgZKlETJwDCAG0SAH5VAFFUVBBUOoBdPTtWiMIBZjtRMGAqdnB-VH6IchHCIZGx8Hh9Q0S2gGsjN2ZY2AcwTnF+wjBYBMITVrNUKmYJ4MJxaBA3ZAyAeTcAK1hR+CuICoQNMsD0AniwS4sRAhCgUSCoIAtEN4LoCMRGgAPZARCp+by+ABc6PoC1G4y4vioAFUILBUEwAJKxdDsWJE06iCJuBmYQgAbz0xGI7ECbPiAB4ALyEDT8pStC5nC7NVoYADknAAbu92YQpAzCOyNTgMSLiFkyrlBadcbBORqGK8Nap9QBfPSegh6UCQGTVQ2oVQM9UdQiy6l0hnM2KhcjoeWESVIpHOFptNLQDK8grWs6xX3gaQ1IMhjOocOR6LRxnkFnx9CyfkptNBwhOl3GoxWnIF0nEAByHxIjU5JAMRjW0nSJwSm2NXEB4iyECMEO7pyBcNE
@d-kja
d-kja / orange-pi.md
Created August 30, 2024 03:20
Orange PI boot from NVME & Connect to wifi

Table

Boot from NVME Steps

First, burn an image on the sd card. Then you can just boot and do the following to update the orange pi firmware, so that you can boot from the NVME