A complete guide to enable hibernation on Fedora 43 (Workstation) with UEFI and btrfs filesystem, including fixes for Secure Boot and SELinux issues.
Run these commands in sequence to enable hibernation:
# Calculate swap size (RAM-based formula)| #!/usr/bin/env bash | |
| set -euo pipefail | |
| # --------------------------------------------------------------------------- | |
| # Intel Xe GPU driver + video acceleration setup for Fedora 44 | |
| # Target: Intel Arrow Lake-H / Arc 140T (Xe2/Xe-LPG+ iGPU), e.g. Core Ultra | |
| # 7 255H. Should also work on other Intel Gen8+ iGPUs (Meteor Lake, Lunar | |
| # Lake, Battlemage-based) with no changes. | |
| # | |
| # What this script does: | |
| # 1. Detects the Intel GPU PCI device ID automatically (no hardcoded IDs). |
A complete guide to enable hibernation on Fedora 43 (Workstation) with UEFI and btrfs filesystem, including fixes for Secure Boot and SELinux issues.
Run these commands in sequence to enable hibernation:
# Calculate swap size (RAM-based formula)| """ | |
| This is based on https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm, | |
| with the requirement that the maximum norm is used for distance calculations. | |
| The algorithm is as follows, described for R^2, but it is easily extensible to | |
| arbitrary dimensions >2: | |
| - given points p_1, ..., p_n, we start by constructing our funnel | |
| by calculating | |
| dp_1 = (p_2 - p_1) | |
| x_1_top = (dp_1_y + epsilon) / dp_1_x |
| // Used for one JSON file for each language containing all namespaces | |
| i18next.use({ | |
| type: 'backend', | |
| read<Namespace extends keyof typeof en>( | |
| language: LocaleCode, | |
| namespace: Namespace, | |
| callback: ( | |
| errorValue: unknown, | |
| translations: null | typeof en[Namespace] | |
| ) => void |
| Switch proxySwitch "I am ... [MAP(sleeping.map):%s]" | |
| Number proxyNumber "Probability [%.5f %%]" | |
| Group gBAYESIAN "Bayesian Sleep Sensor" { | |
| bayesian="proxySwitch" [ prior=0.5, threshold=0.85, state_given_true="ON", state_given_false="OFF" ] | |
| } | |
| Switch testSwitch1 "I am at home ... [MAP(yes-no.map):%s]" <presence> (gBAYESIAN) { | |
| bayesian="ON" [ prob_given_true=0.99, prob_given_false=0.5 ] | |
| } |
Information in this Gist originally from this github issue, which is outdated.
As @RomanMinkin mentioned, you can also consider Casbin (https://github.com/casbin/casbin). It is the most starred authorization library in Golang. There are several differences between Casbin and OPA.
| Feature | Casbin | OPA |
|---|---|---|
| Library or service? | Library/Service | Library/Service |
| How to write policy? | Two parts: model and policy. Model is general authorization logic. Policy is concrete policy rule. | A single part: Rego |
| RBAC hierarchy | Casbin supports role hierarchy (a role can have a sub-role) | Role hierarchies can be encoded in data. Also with the new graph.reachable() built-in function queries over those hierarchies are much more feasible now. |
| RBAC separation of duties | Not supported | Supported: two roles cannot be assigned together |
There are some monitors, in my case Dell U2413, that report having YCbCr support when plugged in over HDMI. My AMD Radeon RX 570 Series video card sees this YCbCr pixel format and then prefers that over the RGB pixel format. The result is that fonts, graphics and other visuals are pixelated and not smooth in Ubuntu.
This actually is not just a Linux problem. A similar problem exists on macOS with the same monitor hooked up over HDMI. In fact an article by John Ruble on the Atomic Object blog called Fixing the External Monitor Color Problem with My 2018 MacBook Pro attempts to fix the exact same thing.
All of the articles I could find exploring this topic advocate patching the EDID for the monitor. Unfortunately the macOS solution would not work here. Luckily I found a Reddit post that covered how to get it working.
DST=/mnt
find /var/lib -type f -size +1G -exec ls -lh {} \; | tee $DST/bigfiles_var_lib_$(date "+%H%M").log
find /var/lib -type f -size +1G -exec ls -lh {} \; | awk '{ print $5 ": " $9 }' | sort -rh > $DST/bigfiles_var_lib_$(date "+%H%M").sorted.log
Note: This gist may be outdated, thanks to all contributors in comments.
adb is the Android CLI tool with which you can interact with your android device, from your PC
You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.
Don't hesitate to read comments, there is useful tips, thanks guys for this !
| #!/bin/bash | |
| set -o errexit | |
| clear | |
| printf "\n*** This script will download a cloud image and create a Proxmox VM template from it. ***\n\n" | |
| ### HOW TO USE | |
| ### Pre-req: | |
| ### - run on a Proxmox 6 server | |
| ### - a dhcp server should be active on vmbr1 |