Skip to content

Instantly share code, notes, and snippets.

View JiangXL's full-sized avatar
👀
?

H.F. JiangXL

👀
?
View GitHub Profile
@tobikris
tobikris / repair-dualboot-bootloader.sh
Last active March 3, 2025 21:35 — forked from Tamal/set-chroot.sh
Setting up chroot from a live image in Fedora. Regenerate grub2 for Fedora.
$ # Use Live CD to boot
$ sudo su # Switch to root
$ fdisk -l # Get names of root, boot & EFI partition names. you can also use blkid
$ # http://dadadom.de/2020/04/11/fix-fedora-uefi-boot-with-encrypted-partitions/
$ udiskctl unlock -b /dev/nvme0n1p6 # unlock root luks partition
$ mount /dev/mapper/fedora_fedora-root /mnt # mount root partition
$ mount /dev/mapper/fedora_fedora-var /mnt/var
$ mount /dev/nvme0n1p5 /mnt/boot # mount boot partition
"""
@package
Output: CSV (comma-separated)
Grouped By: Value
Sorted By: Ref
Fields: Comment,Designator,Footprint,LCSC
Outputs the BOM for JLCPCB. Run this AFTER generating your POS file for SMT assembly.
Attempts to find and modify POS header to JLC format in the same output folder.
@karuboniru
karuboniru / podman qq setup
Last active October 10, 2021 01:47
Podman QQ
podman run --name qq \
--device /dev/snd --net=host --ipc=host \ # remove net=host if you don't want this
--device=/dev/dri/card0:/dev/dri/card0 \
--device=/dev/dri/renderD128:/dev/dri/renderD128 \
-v /tmp/.X11-unix:/tmp/.X11-unix:ro \
-v ${XDG_RUNTIME_DIR}/pulse/native:/run/user/0/pulse/native \
-e PULSE_SERVER=unix:/run/user/0/pulse/native \
-v $HOME/containerhome:/root:Z \ # choose a path you like, same for following
-v $HOME/containerhome/TencentFiles:/TencentFiles:Z \
-v $HOME/文档/Fonts:/usr/share/fonts/Windows:Z \ # external fonts, any path in /usr/share/fonts will be fine
@ochafik
ochafik / README.md
Last active December 10, 2024 07:01
OpenSCAD Examples sped up by fast-csg feature

Here are some micro benchmarks that demonstrate big gains of OpenSCAD rendering with --enable=fast-csg (a feature I developed in this pull request).

Note: some (but not all) models making heavy use of minkowski may be slower with the feature enabled, as CGALUtils::applyMinkowski is forcing conversions to the old nef format. I hope to address that + publish benchmarks involving minkowski operations soon!*

Note2: these figures need updating, lots of changes since last time I tested these files! Most notably, I'm now proactively falling back to Nef computations in many cases that could have been handled by fast PMP operations on surface meshes, just by fear of hitting corner cases that might corrupt the data. Makes things slower :-(

  • uncacheable-grid.scad (see below): 35sec -> 1.5sec (31x faster)
  • chainmail.scad (see below): 24min 15sec -> 4min 27sec (5x faster)
  • spheres_nested_for_loops.scad (see below): 44sec
@perry-mitchell
perry-mitchell / dell-r720-fan-control.sh
Last active April 18, 2025 12:44
Dell R720 quiet fan control
#!/bin/bash
IDRAC_IP="192.168.0.101"
IDRAC_USER="root"
IDRAC_PASS=$1
if [ -z $IDRAC_PASS ]; then
IDRAC_PASS=$IDRAC_PASSWORD
fi
FANS_1="0x0A" # 10%
@probonopd
probonopd / Wayland.md
Last active April 16, 2025 20:29
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.


As 2024 is winding down:

@pschatzmann
pschatzmann / Springs.ipynb
Last active March 3, 2025 22:13
3D Printed Springs in OpenSCAD
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Tamal
Tamal / set-chroot.sh
Last active March 20, 2025 22:39
Setting up chroot from a live image in Fedora. Regenerate grub2 for Fedora.
$ # Use Live CD to boot
$ sudo su # Switch to root
$ fdisk -l # Get names of root, boot & EFI partition names. you can also use blkid
$ mount /dev/mapper/fedora_localhost--live-root /mnt # mount root partition
$ cat /mnt/etc/fedora-release
Fedora release 31 (Thirty One)
$ mount /dev/nvme0n1p2 /mnt/boot # mount boot partition
$ mount /dev/nvme0n1p1 /mnt/boot/efi # mount EFI partition
# Note: If you are not able to mount EFI partition ('Input/Output error'),
# You may have to repair ESP file system or format ESP.
@msenol86
msenol86 / PKGBUILD
Last active April 22, 2025 18:50 — forked from springzfx/PKGBUILD
Fix copytoclipboard in deepin-screenshot by using xclip
# Maintainer: Felix Yan <[email protected]>
# Contributor: Josip Ponjavic <josipponjavic at gmail dot com>
# Contributor: Xu Fasheng <fasheng.xu[AT]gmail.com>
# Contributor: Mucahit Senol <mucahitsenol86 at gmail dot com>
pkgname=deepin-screenshot
pkgver=5.0.0
pkgrel=1
pkgdesc="Easy-to-use screenshot tool for linuxdeepin desktop environment"
arch=('x86_64')
@jb-alvarado
jb-alvarado / pci-passthrough.md
Last active October 27, 2023 02:16
PCI Passthrough on Fedora 31

PCI Passthrough

Hardware:

  • Mainboard ASUS PRIME Z390-A Z390
  • ASUS Dual-GTX1650-O4G
  • Intel i9 9900
  • 32GB Ram
  • NEC Corporation uPD720200 USB 3.0 Host Controller
  • Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983 (1 TB)