Skip to content

Instantly share code, notes, and snippets.

@miXwui
miXwui / framework-13-amd-upgrade.md
Last active April 28, 2024 18:38
Framework 13 AMD 7080U Upgrade (From i7-1165G7, Fedora 38)

Note: this is an ongoing process which I'm documenting here. Semi-experimental, but this is my daily driver machine since September 2021 (work included), so I'm aiming for stability (hence why I'm not using the recommended Fedora 39 Beta).

Upgraded from an Intel i7-1165G7 to AMD 7080U mainboard:

  • 64GB (2x32GB) G.Skill F5-5600S4040A32GX2-RS
    • Have an SK Hynix 16GB (2x8GB) 4800MHz (HMCG66MEBSA095N BA) kit that I'll test just to see power draw difference.
  • SK hynix Gold P31 2TB PCIe NVMe Gen3 M.2 2280

These notes are for Fedora 38 6.5.8-200.fc38.x86_64 with SwayWM.

Booted into Fedora with BIOS 3.02 and seemed fine. First thing I did was upgrade to 3.03.

@marcomalva
marcomalva / launch-jupyter-notebook.sh
Created September 4, 2022 21:28
[Podman - Launch Jupyter Datascience Notebook]Jupyter Notebook with Python, R, Markdown, and Terminal and RW to ~/work #podman #jupyter
#!/bin/bash
#
# launch datascience-notebook jupypter notebook as podman container with read/write to current folder (~/work folder inside container)
#
# once launched open notebook in web-browser under: http://localhost:10000
# copy token from podman stdout
#
# based on official web site, see https://jupyter-docker-stacks.readthedocs.io/en/latest/using/running.html#using-the-podman-cli
# see also: [Running rootless Podman as a non-root user | Enable Sysadmin](https://www.redhat.com/sysadmin/rootless-podman-makes-sense)
#
@dineshsaini
dineshsaini / gist:caf8fb2d53b315cf32f0d55092ef4c0e
Last active November 7, 2023 11:00
make gnome tracker disable or stop completely
#!/usr/bin/env bash
# make tracker3 daemon non workable & idompotent
# this script will reset its settings, and configure tracker3 daemon, to not let it do anyting.
# if other code has dependency on this tracker, then it will not break, but we also do achieve our goal.
# interpretation for org.freedesktop.Tracker3.Miner.Files enable-monitor from this file
# https://gitlab.gnome.org/GNOME/tracker-miners/-/blob/master/src/miners/fs/tracker-config.c
#Time in seconds before crawling filesystem (0->1000)
@sylvainfaivre
sylvainfaivre / thinkpad_cpu_throttling_lap_mode.md
Last active April 28, 2024 06:48
CPU throttling and "lap mode" on Lenovo Thinkpad laptops

CPU throttling and "lap mode" on Lenovo Thinkpad laptops

Test setup

Hardware : Lenovo Thinkpad P14s, Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz

Software : Ubuntu 21.10, Gnome 40.4.0, Linux 5.13.0

Background

@jdoss
jdoss / LUKS_and_TPM2_with_Fedora.md
Last active July 20, 2024 00:04
Decrypt LUKS volumes with a TPM on Fedora Linux

Decrypt LUKS volumes with a TPM on Fedora Linux

This guide allows you to use the TPM on your computer to decrypt your LUKS encrypted volumes. If you are worried about a cold boot attack on your hardware please DO NOT use this guide with your root volume!

Preflight Checks

Verify that you have a TPM in your computer:

# systemd-cryptenroll --tpm2-device=list
PATH DEVICE DRIVER
@vwbusguy
vwbusguy / auto-profile-update.sh
Last active May 23, 2024 19:40
Auto Update for power-profiles-daemon
#!/bin/bash
dbus-monitor --system "type='signal',path='/org/freedesktop/UPower/devices/battery_BAT0',member='PropertiesChanged'" | while read LINE; do
echo ${LINE} | grep battery_BAT0 | grep -q PropertiesChanged
if [ $? -eq 0 ]; then
BATT_STAT=$(dbus-send --print-reply=literal --system --dest=org.freedesktop.UPower /org/freedesktop/UPower/devices/battery_BAT0 org.freedesktop.DBus.Properties.Get string:org.freedesktop.UPower.Device string:State | awk '{ print $3; }')
if [ $BATT_STAT -eq 1 ] || [ $BATT_STAT -eq 4 ]; then
LEVEL=$(powerprofilesctl list | grep -q performance && echo "performance" || echo "balanced")
elif [ $BATT_STAT -eq 5 ]; then
LEVEL="balanced"
@eloylp
eloylp / Fedora35Hibernation.md
Last active July 10, 2024 11:16
Fedora 35 hibernation with swapfile, only for hibernation and resume

Fedora35 hibernation

This guide helps to configure the hibernation on a default Fedora35 (also worked fine in previous Fedora34) installation by using a swap file. The Fedora35 installation comes with btrfs as default filesystem. Also, it comes with a zram swap device:

$ swapon
NAME       TYPE      SIZE USED PRIO
/dev/zram0 partition   8G   0B  100
@linderd
linderd / README.md
Last active July 11, 2024 01:38 — forked from timlinux/README.md
Linux on Thinkpad P14s Gen2 AMD / T14 Gen2 AMD

Linux (Fedora 35) on a Thinkpad P14s [T14] Gen2 AMD

These are my installation-tricks and notes for running Linux on a 2021 Thinkpad P14s Gen2 with AMD Ryzen 7 5850U. It should also be suitable for the Thinkpad T14 Gen2 AMD as they are technically the same modell.
Meanwhile there is also a good test on youtube and an entry in the arch-wiki, which also comments some points mentioned here.

Detailed specs

Shipped:

@sandys
sandys / Fastapi-sqlalchemy-pydantic-dataclasses-reloadable-logging.md
Last active June 30, 2024 09:23
fastapi with python 3.10 dataclasses - used to create both sqlalchemy and pydantic models simultaneously. And setting up sqlalchemy the right way (without deadlocks or other problems). Additionally, this also takes care of unified logging when running under gunicorn..as well as being able to run in restartable mode.