Skip to content

Instantly share code, notes, and snippets.

View lijikun's full-sized avatar
🍋
Dilettante

Jikun Li lijikun

🍋
Dilettante
View GitHub Profile
@lijikun
lijikun / g16-linux-ryzen.md
Created July 4, 2021 13:12
Make Gaussian 16 Linux Work with Ryzen CPUs

Just install g16 as you normally would with any Intel CPU, and add PGI_FASTMATH_CPU=haswell at the end of $g16root/g16/bsd/g16.profile. source it as you normally would.

Tested to work with G16 Rev. A03 AVX2 version on AMD Ryzen 7 4800U, with Ubuntu 20.04 LTS.

@lijikun
lijikun / letsencrypt-freeipa.md
Last active August 27, 2024 09:47
Use Let's Encrypt Certificate for FreeIPA Server on CentOS 8
@lijikun
lijikun / OpenLDAP-to-FreeIPA_Ubuntu.md
Last active August 14, 2020 14:26
Migrate a Client Computer (Debian/Ubuntu) from OpenLDAP to FreeIPA for User Authentication

A Guide for Migrating an OpenLDAP Client to FreeIPA (Debian/Ubuntu)

Introduction

As OpenLDAP is being phased out by various OS vendors, it might be necessary to migrate to a more "modern" directory software stack like FreeIPA (which is, of course, more than just a directory service), as I've recently done for a small scientific computing cluster.

This gist has been tested on a CentOS 8 FreeIPA server, and clients on various versions of Debian and Ubuntu LTS. The steps are tested to the extent that they are sufficient for migrating to a functional FreeIPA client, but I am not sure every step detailed here is necessary.

For "fresh" server and clients, one can pretty much follow the server setup procedure in Digital Ocean's tutorial and related client setup guides for [Debian/Ubuntu](https://ww

@lijikun
lijikun / dkms-kmod-auto-mok-signing.md
Last active November 28, 2024 00:24
Automatic Signing of DKMS-Generated Kernel Modules for Secure Boot

Automatic Signing of DKMS-Generated Kernel Modules for Secure Boot (Nvidia Driver on CentOS 8 as Example)

First I thank Nvidia for sponsoring the video card.

Secure Boot isn't exactly easy to configure to work with Linux and disabling it isn't really a good idea. Many modern Linux distributions provide the Microsoft-signed shim EFI binary to interpose between Secure Boot and the grub2 bootloader, making booting Linux easy enough if you only ever use kernels and drivers from the official repos. Still, enabling Secure Boot prevents the loading of kernel or modules without a proper digital signature. For example, the propriatary Nvidia GPU driver won't work, unless your distro really went to great lengths to distribute a signed version of the kernel module.

To make Secure Boot play nicely with the driver (i.e. to work at all), we can generate and import a Machine Owner Key (MOK)

@lijikun
lijikun / pdf-summary.md
Last active June 12, 2020 15:25
Creating a PDF file containing the first page of multiple PDFs using Linux command line

Extracting First Pages of Multiple PDFs and Combining Them Into a Single File

Prequisites

  • Linux, bash, qpdf, pdfunite

  • Your source PDF files collected in a directory (e.g. /tmp/source)

  • An empty, temporary folder to collect intermediate files (e.g. /tmp/PDFs)