Skip to content

Instantly share code, notes, and snippets.

@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.
@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 / 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 / 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 / config.txt
Last active February 20, 2022 10:23
My almost perfect Lakka 240p setup
############## My Custom Settings ##############
##### Display
# SDTV over Composite
sdtv_mode=16 # NTSC
sdtv_mode=17 # Japanese NTSC (no pedestal, darker) to match my other japanese consoles
sdtv_aspect=1
disable_overscan=1
@starquake
starquake / lsof.log
Created February 16, 2017 16:22
dotnet open files issue
➜ ~ ps ax | grep dotnet
9572 s001 S+ 0:01.72 dotnet new --install Microsoft.AspNetCore.SpaTemplates::*
9573 s001 S+ 0:01.69 /usr/local/share/dotnet/dotnet restore /Users/starquake/.templateengine/dotnetcli/v1.0.0-rc4-004834/scratch/restore.csproj --packages /Users/starquake/.templateengine/dotnetcli/v1.0.0-rc4-004834/scratch/Packages
9574 s001 S+ 0:02.43 dotnet exec /usr/local/share/dotnet/sdk/1.0.0-rc4-004834/MSBuild.dll /m /v:m /NoLogo /t:Restore /ConsoleLoggerParameters:Verbosity=Minimal /p:RestorePackagesPath=/Users/starquake/.templateengine/dotnetcli/v1.0.0-rc4-004834/scratch/Packages /Users/starquake/.templateengine/dotnetcli/v1.0.0-rc4-004834/scratch/restore.csproj /Logger:Microsoft.DotNet.Tools.MSBuild.MSBuildLogger,/usr/local/share/dotnet/sdk/1.0.0-rc4-004834/dotnet.dll
10395 s002 S+ 0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn dotnet
➜ ~ lsof -p 9572
COMMAND PID USER FD TYPE DEV
#!/bin/sh -ex
losetup /dev/loop0 && exit 1 || true
image=arch-linux-$(date +%Y%m%d).img
wget -N http://archlinuxarm.org/os/ArchLinuxARM-rpi-2-latest.tar.gz
truncate -s 1G $image
losetup /dev/loop0 $image
parted -s /dev/loop0 mklabel msdos
parted -s /dev/loop0 unit MiB mkpart primary fat32 -- 1 32
parted -s /dev/loop0 set 1 boot on
parted -s /dev/loop0 unit MiB mkpart primary ext2 -- 32 -1
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
.element {
position:absolute;
top:-50%;
left:-50%;
mediamonkey
description: Desktop Computer
product: ��������������������������������� (���������������������������������)
vendor: ���������������������������������
version: ���������������������������������
serial: ���������������������������������
width: 64 bits
capabilities: smbios-2.8 dmi-2.7 vsyscall32
configuration: boot=normal chassis=desktop family=��������������������������������� sku=��������������������������������� uuid=00ACCF50-A653-E211-AB46-C03FD568DC17
*-core
@starquake
starquake / Main.js
Created June 24, 2014 09:06
(TestApp1/app/view/Main.js) Problems with Sencha Touch and Sencha CMD 5
Ext.define('TestApp1.view.Main', {
extend: 'Ext.tab.Panel',
xtype: 'main',
requires: [
'Ext.data.TreeStore',
'Ext.data.JsonP',
'Ext.data.proxy.JsonP',
'Ext.dataview.NestedList',
'Ext.Panel',
'Ext.form.Panel',