Skip to content

Instantly share code, notes, and snippets.

@jacky9813
jacky9813 / install-nv-driver-fc41.md
Created October 31, 2024 01:47
Install NVIDIA proprietary driver on Fedora 41

There are some steps that is not documented in the RPMFusion's installation guide. Here's how I install NVIDIA driver on Fedora 41.

  1. Update all packages and reboot
  2. Install akmod-nvidia from RPMFusion, optionally with packages for CUDA or NVENC.
  3. For some reason, after akmod installation, I didn't see modeset=1 on kernel option, so:
#!/bin/bash
@jacky9813
jacky9813 / [email protected]
Last active July 20, 2024 07:20
Minecraft Server
[Unit]
Description=Minecraft Server in /opt/minecraft-server/%i
After=network-online.target
Requires=network-online.target
[Service]
Type=simple
KillSignal=SIGINT
ExecStart=/opt/minecraft-server/%i/run.sh --nogui
WorkingDirectory=/opt/minecraft-server/%i
@jacky9813
jacky9813 / convert-to-efi.chroot.sh
Created April 20, 2024 09:49
[Linux] Convert boot mode to UEFI
#!/bin/bash
#
# Convert to EFI
#
# IMPORTANT NOTES:
# * This script CAN ONLY BE running in a chrooted environment.
# * This script will install shim, but still secure boot may fail.
#
# Tested for CentOS 7, but should have a similar process for all other
# Linux distros, at least for RHEL for its derivatives.
@jacky9813
jacky9813 / azurerm_error.log
Created March 6, 2024 10:33
Terraform error log from AzureRM
2024-03-06T18:30:30.003+0800 [ERROR] provider.terraform-provider-azurerm_v3.93.0_x5: Response contains error diagnostic:
diagnostic_summary=
| deleting Load Balancer Backend Address Pool (Subscription: "<REDACTED>"
| Resource Group Name: "<REDACTED>"
| Load Balancer Name: "example-lb"
| Backend Address Pool Name: "example-lb-be-address-pool"): performing LoadBalancerBackendAddressPoolsDelete: unexpected status 400 with error: LoadBalancerBackendAddressPoolInUseByVirtualMachineScaleSet: Cannot remove backend address pool example-lb-be-address-pool from load balancer since it is in use by virtual machine scale set /subscriptions/<REDACTED>/resourceGroups/<REDACTED>/providers/Microsoft.Compute/virtualMachineScaleSets/example-vmss.
tf_provider_addr=provider tf_resource_type=azurerm_lb_backend_address_pool @module=sdk.proto diagnostic_detail="" tf_req_id=afb22b8f-5f14-9af2-02f4-e818d11f69c4 diagnostic_severity=ERROR @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/diag/diagn
@jacky9813
jacky9813 / cmon-intel.ps1
Last active October 17, 2023 19:05
intel 13th gen Core i FREE UPGRADE!!!!!
# A wonderful upgrade tool for Intel 14th gen Core i processors!
# This script is required to run in an PowerShell session with administrator access.
#
# All you need to do is open PowerShell as Administrator, copy this file and paste to
# that PowerShell window and you're done upgrading!
$upgraded_cpu_names = @{
"13600KF" = "14600KF";
"13600K" = "14600K";
"13900KF" = "14900KF";
@jacky9813
jacky9813 / lxc-wsl2.md
Last active October 2, 2024 14:35
Running LXC VM in WSL2

Running LXC/LXD VM in WSL2 (Windows 11 Only)

If you just running LXC/LXD containers, the default settings for WSL2 (both Windows 10 and Windows 11) should be adequate.

However, if trying something like lxc launch images:alpine/3.18 --vm, LXC will complain that vhost_vsock module is not loaded.

Here's how I configure WSL2 so I can run VM with LXC/LXD.

@jacky9813
jacky9813 / README.md
Last active November 13, 2022 07:10
Journey of Installing Gentoo Linux

My Journey of Installing Gentoo Linux

Welp, since it is Gentoo Linux, it'll never gonna be easy to install, and definitely having much more rocky process than Rocky Linux (pun intented).

Installing Gentoo Linux is just a test to my Linux knowledge and hopefully it'll help me troubleshoot problems when managing other's machine.

Anyway, the official Gentoo Installation Handbook is very helpful for getting started, mostly.

The scope of the installation

Building Python 3.11

This article focuses on building CPython for common Linux server operating systems.

These scripts will be tested in fresh Docker container.

I'll install dependencies from package manager if possible, or I'll try compile myself if that makes sense.

The dependencies doesn't change much between these CPython versions, so Python 3.12 and 3.10

Dim verbose
verbose = True
' verbose = False
Sub WordCallback(FilePath)
On Error Resume Next
Dim outputPath, oDoc
outputPath = FilePath & "x"
If verbose Then
Wscript.Echo FilePath & " => " & outputPath