Skip to content

Instantly share code, notes, and snippets.

View infibrocco's full-sized avatar
💭
Existing

infibrocco

💭
Existing
  • Earth
View GitHub Profile
@infibrocco
infibrocco / memwatcher.py
Created August 1, 2024 08:06
simple python program to check for high memory usage processes and optionally killing them
#!/usr/bin/env python3
import psutil
def check_high_memory_usage(threshold=90):
"""
Check for processes using more than the specified threshold of memory.
Args:
threshold (int): The memory usage percentage threshold. Default is 90.
@Lili1228
Lili1228 / convert.sh
Last active September 1, 2023 17:54
Convert Manjaro to Arch
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Tested on freshly installed Manjaro 22.0.5 Gnome.
pamac build trizen
cat >/tmp/convert.sh <<EOF
pacman -Qq | grep pamac | xargs pacman -Rs --noconfirm manjaro-application-utility
pacman -Rdd manjaro-release bashrc-manjaro manjaro-keyring python-manjaro-sdk
pacman -U https://www.archlinux.org/packages/core/x86_64/{lsb-release,pacman{,-mirrorlist}}/download/
mv /etc/pacman.d/mirrorlist.pacnew /etc/pacman.d/mirrorlist
@cadr10
cadr10 / thesims4.sh
Last active October 12, 2024 17:12
The Sims 4 LINUX LUTRIS installer
#!/bin/bash
##TESTED WITH: FITGIRL REPACK LIVING ISLAND (NEED TO RUN TROUBLESHOOTING AFTER INSTALL) and CODEX.
##TESTADO COM: FITGIRL REPACK LIVING ISLAND (PRECISA RODAR O CONSERTAR DEPOIS DE INSTALAR) e CODEX.
#This can fix: executable not found error; game opens then closes after a sec; games opens with wrong language
#A seção consertar vai arrumar: problema de 'executable not found', o jogo abre e fecha depois de 1 segundo e o jogo abre em inglês.
trouble1() {