Skip to content

Instantly share code, notes, and snippets.

@starquake
starquake / StripHtml.cs
Last active February 2, 2022 17:04 — forked from frankhale/StripHtml.cs
Strip HTML using HtmlAgilityPack
public static string StripHtml(this string value)
{
HtmlDocument htmlDoc = new HtmlDocument();
htmlDoc.LoadHtml(value);
if (htmlDoc == null)
return value;
return htmlDoc.DocumentNode.InnerText;
}
@starquake
starquake / mount-fc-ide.sh
Last active October 14, 2020 21:17
Mount Compact Flash drive using Ontrack Disk Manager on Linux
#!/bin/sh
echo Creating loop device with 63 bytes offset...
udisksctl loop-setup -f /dev/sdb -o 32256
echo DOS CF mount script finished...
@starquake
starquake / unmount-cf-ide.sh
Last active October 14, 2020 21:17
Unmount disk mounted with mount-cf-ide.sh
#!/bin/sh
echo Syncing data...
sync
echo Unmount loop partitions
udisksctl unmount -b /dev/loop0p1
udisksctl unmount -b /dev/loop0p5
udisksctl unmount -b /dev/loop0p6
udisksctl unmount -b /dev/loop0p7
udisksctl unmount -b /dev/loop0p8
@starquake
starquake / debian-12-silent-boot.md
Last active November 3, 2023 19:37
Silent boot Debian 12

Silent Boot in Debian 12

Set this in your /etc/default/grub file:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash loglevel=3 systemd.show_status=auto rd.udev.log_level=3 vt.global_cursor_default=0"
  • quiet: Disable most log messages.
  • splash: Make sure plymouth shows the splash screen.
  • loglevel: Only show messages with loglevel 3 (KERN_ERR) or lower. Lower levels are more serious.
  • systemd.show_status=auto: Suppress succesfull messages.
  • rd.udev.log_level=3: Only show messages with loglevel 3 (KERN_ERR) or lower. Lower levels are more serious.