Skip to content

Instantly share code, notes, and snippets.

View Vantomas's full-sized avatar

Tomáš Holý Vantomas

View GitHub Profile

Update firmware WD Black SN770 firmware on Arch Linux

Been having problems with my new SN770 drive, and decided to check if I can firmware update it on Linux. WD only provides a Windows tool, Western Digital Dashboard to download and install firmwares, but, it's possible to find the firmware and install it using Linux tooling as well.

1. Check that nvme-cli is installed:

❱ sudo pacman -S nvme-cli
@Vantomas
Vantomas / banuser-root-cz.js
Last active August 20, 2025 19:36
banuser-root-cz
// ==UserScript==
// @name Skrytí komentářů na Root.cz a fóru (více uživatelů)
// @namespace http://tampermonkey.net/
// @version 2.4
// @description Skrývá komentáře konkrétních uživatelů na Root.cz a fóru Root.cz, nahrazuje jejich profilové fotky a umožňuje opětovné skrytí komentářů s odkazem na začátku zprávy.
// @author Tvůj Nick
// @match https://www.root.cz/*
// @match https://forum.root.cz/*
// @grant none
// ==/UserScript==
@Vantomas
Vantomas / PHP_Xhprof_on_macOS.md
Last active July 14, 2021 13:33
PHP Xhprof on macOS
  1. pecl install xhprof
  2. Change path in php.ini in [xhprof] extension=
@Vantomas
Vantomas / brew-lighttpd-with-lua.md
Created February 17, 2021 08:55
brew-lighttpd-with-lua.md
@Vantomas
Vantomas / brew-php-with-imap.md
Created February 4, 2021 14:10
Recompile PHP on macOS using Homebrew with IMAP extension enabled
  1. Run brew edit php@7.4
  2. Add depends_on "imap-uw" at the end of the depends_on section
  3. Check which version of openssl is in the depends_on section
  4. Add --with-imap=#{Formula["imap-uw"].opt_prefix} at the end of the --with section
  5. Add --with-imap-ssl=#{Formula["openssl@1.1"].opt_prefix} after --with-imap. Check sure it is the same version as in the depends_on section
  6. Run brew reinstall --build-from-source php@7.4
  7. It is not necessary to enable the php_imap.so extension in php.ini, because it is already compiled into PHP. You can check phpinfo();