Skip to content

Instantly share code, notes, and snippets.

konradmb /
Last active March 9, 2023 03:40 — forked from 2E0PGS/
Fix Ubuntu and other Linux slow/hanging file copying via USB.

If your running a x64 bit Ubuntu or other Linux and find USB transfers hang at the end apply this fix:

echo $((16*1024*1024)) | sudo tee /proc/sys/vm/dirty_background_bytes
echo $((48*1024*1024)) | sudo tee /proc/sys/vm/dirty_bytes

To revert the changes enter this in console

konradmb /
Last active March 8, 2023 23:25
Generate thumbnails in Gnome
import os
import sys
from concurrent.futures import ThreadPoolExecutor
import gi
from gi.repository import Gio, GnomeDesktop
gi.require_version('GnomeDesktop', '4.0')
konradmb / Containerfile
Created November 17, 2022 00:24
RealESRGAN CPU podman/docker test
FROM ubuntu:22.04
RUN apt update
RUN apt install python3 python3-pip -y
RUN pip3 install realesrgan
RUN apt install -y libgl1 libglib2.0-0
RUN apt install wget -y
RUN wget
RUN chmod +x
RUN python3
ENTRYPOINT python3 -i /img/input -o /img/output --fp32
konradmb / des.nim
Created November 25, 2018 14:54
import strutils
import sequtils
import bitops
import os
import des_utils
type CDTuple = array[17,tuple[c:BitArray,d:BitArray]]
type LRTuple = array[17,tuple[l: bin32,r: bin32]]
konradmb /
Last active September 4, 2015 18:51
Check for missing files from installed APT packages.
#This script checks for missing files, by scanning through lists of installed files in APT package list.
#Sometimes file is listed in APT .list file, but it's not installed by default, so you need to manually
#check if package needs reinstalling or if it's just a normal condition.
#Tested only on Ubuntu 15.04
#This is only very simple check. To test integrity of installed packages, use debsums.
for file in /var/lib/dpkg/info/*.list