Skip to content

Instantly share code, notes, and snippets.

View timbryandev's full-sized avatar
🐝
Busy Bee'ing

timbryandev timbryandev

🐝
Busy Bee'ing
View GitHub Profile
@timbryandev
timbryandev / DangerousHtml.jsx
Created August 11, 2022 13:59
Prevent XSS in React via dangerouslySetInnerHTML
/*
Exampmes:
// 1
const markup = `<p>Hola <img src='none.png' onerror='alert("Rainbow mode FTW!")'> Sharon</p>`
<DangerousHtml innerHTML={markup} /> // <p>Hola <img src='none.png'> Sharon</p>
// 2
<DangerousHtml
@timbryandev
timbryandev / NVME SSD Freezing on Linux.md
Last active July 16, 2025 02:16
NVME SSD Freezing on Linux

Credit to the original poster: https://esc.sh/blog/nvme-ssd-and-linux-freezing/ Recording a copy here for personal use as I distro hop a lot and excitement with distros on a laptop that suffers from this issue.

nvme_core.default_ps_max_latency_us=5500

How to update the Kernel parameter

First of all, figure out if you are using Grub or systemd boot. If you are using Pop OS!, you are most probably using systemd-boot. I believe Ubuntu is still using Grub2, please do your research.

For Grub