Skip to content

Instantly share code, notes, and snippets.

@TomaszGasior
TomaszGasior / Containerfile
Created November 4, 2025 17:25
Run Jupyter Lab easily in Podman container
FROM docker.io/python:3.14.0-alpine3.22
RUN sh -ex <<EOF
apk add --no-cache --virtual build-deps gcc linux-headers musl-dev
pip install jupyterlab==4.4.10
apk del build-deps
EOF
RUN mkdir -p /data /jupyter
VOLUME /data /jupyter
@TomaszGasior
TomaszGasior / dell-custom-fan-speed
Last active May 7, 2025 23:31
Custom fan speed for Dell Optiplex 7050 Micro on Fedora 37 with Intel Core i7-7700T
#!/bin/bash
export CPU_TEMP_THRESHOLD_FOR_FAN_SPEED_LOW=54
export CPU_TEMP_THRESHOLD_FOR_FAN_SPEED_HIGH=68
export SLEEP_TIME_SECS=10
export GET_CPU_TEMP_FILE=/sys/devices/platform/coretemp.0/hwmon/hwmon*/temp1_input
export SET_FAN_SPEED_FILE=/sys/devices/platform/dell_smm_hwmon/hwmon/hwmon*/pwm1
@TomaszGasior
TomaszGasior / optimag.sh
Last active April 19, 2022 14:41
Optimize JPEG, PNG and SVG images with one simple command.
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
get_file_mime_type()
{
local filename=$1
file -b --mime-type "$filename"
}