Skip to content

Instantly share code, notes, and snippets.

View darkguy2008's full-sized avatar

Alemar darkguy2008

View GitHub Profile
@darkguy2008
darkguy2008 / Ubuntu 22.04.md
Last active September 6, 2022 05:11
Ubuntu post-install steps / snippets / scripts

Ubuntu 22.04 LTS post-install steps / snippets / scripts

Install Ubuntu as Ubuntu Server (minimized)

Delete user (if any)

sudo deluser --remove-home user

Add swap

@darkguy2008
darkguy2008 / README.md
Created March 23, 2021 17:51 — forked from smoser/README.md
qemu to linux mapping of smbios / dmi information

Mappings for DMI/SMBIOS to Linux and dmidecode

Information can be put into dmi tables via some qemu-system hosts (x86_64 and aarch64). That information is exposed in Linux under /sys/class/dmi/id and can be read with dmidecode. The names are very annoyingly inconsistent. The point of this doc is to map them.

Mappings

Example qemu cmdline:

qemu-system-x86_64 -smbios type=<type>,field=value[,...]

qemu-system-x86_64 -smbios type=0,vendor=superco,version=1.2.3

KVM OSX Guest 10.11 (El Capitan) with Clover

  • Some notes about this approach:
    • An OSX Installer USB drive for Install OS X El Capitan is created
    • Clover is then installed on the USB drive
    • Clover Configurator is then run on the USB drive
    • The USB drive contents are copied to the VM host
    • VNC is used to connect to the guest UI
  • The qxl virtual video device is used (part of the standard kvm qemu install)
@darkguy2008
darkguy2008 / gist:0b27a23ac40d863553f0b01ed7da9cfd
Last active July 24, 2021 12:25
Fix Linux font rendering in Ubuntu / KDE Neon
Ref: https://peter.quantr.hk/2012/12/how-to-change-fedoras-font-rendering-to-get-an-ubuntu-like-result/#page-content
1) xrdb -query | grep -i xft
Make sure it looks like this:
Xft.antialias: 1
Xft.hinting: 1
Xft.hintstyle: hintslight
Xft.lcdfilter: lcddefault
wget -O /tmp/YaHei.Consolas.1.12.zip https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/uigroupcode/YaHei.Consolas.1.12.zip
unzip /tmp/YaHei.Consolas.1.12.zip
sudo mkdir -p /usr/share/fonts/consolas
sudo mv YaHei.Consolas.1.12.ttf /usr/share/fonts/consolas/
sudo chmod 644 /usr/share/fonts/consolas/YaHei.Consolas.1.12.ttf
cd /usr/share/fonts/consolas
sudo mkfontscale && sudo mkfontdir && sudo fc-cache -fv
@darkguy2008
darkguy2008 / UDPSocket.cs
Last active May 20, 2024 19:01
Simple C# UDP server/client in 56 lines
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
namespace UDP
{
public class UDPSocket
{
private Socket _socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);