Skip to content

Instantly share code, notes, and snippets.

The next time X crashes, don't hit the hard reset button before trying a few other things first:

Try shutting down X gracefully with <Ctrl>+<Alt>+<Backspace>. You may have to first reconfigure your OS to re-enable this key combo, which recent distros have turned off by default. Instructions here: http://askubuntu.com/questions/367983/how-do-i-enable-ctrl-alt-backspace-to-kill-the-x-server If that doesn't work, try switching to a TTY console with <Ctrl>+<Alt>+<F1> and do:

reboot

or

poweroff
@TBog
TBog / zram info
Last active February 25, 2021 08:49 — forked from voyeg3r/zram.sh
How enable zram module on kernel (debian lik distro)?
from
https://www.phoronix.com/forums/forum/software/mobile-linux/1086709-zram-will-see-greater-performance-on-linux-5-1-it-changed-its-default-compressor/page3
There has been this zram-config script in the wild for over 7 years that for some reason has been emulated and copied blindly with no actual reference to the kernel docs or thought as it would seem.
If you just need some free RAM, you can restrict crocesses to a certain amount of it using:
systemd-run --user --scope -p MemoryLimit=500M firefox &
disown -r
Hide console output
@TBog
TBog / .Fluxbox.md
Last active July 29, 2020 07:55
Fluxbox setup
gist name file path
.Xresources ~/.Xresources
apt preferences.d /etc/apt/preferences.d/99debian
lock.sh ~/lock.sh
init ~/.fluxbox/init
keys ~/.fluxbox/keys
menu ~/.fluxbox/menu
startup ~/.fluxbox/startup
theme.cfg ~/.fluxbox/styles/05-Crunchy-green_SQ/theme.cfg
2020-04-19 17:24:38.363 30919-30975/rocks.tbog.tblauncher W/IconPack: Drawable `auto_mate` for ComponentInfo{com.bitspice.automate/com.bitspice.automate.SplashActivity} not found
2020-04-19 17:24:38.367 30919-30975/rocks.tbog.tblauncher W/IconPack: Drawable `squid` for ComponentInfo{com.steadfastinnovation.android.projectpapyrus/com.steadfastinnovation.android.projectpapyrus.application.HeadlessMainActivity} not found
2020-04-19 17:24:38.367 30919-30975/rocks.tbog.tblauncher W/IconPack: Drawable `naruto_blazing` for ComponentInfo{com.bandainamcoent.narutoblazingna/android.nt.project.NTActivity} not found
2020-04-19 17:24:38.376 30919-30975/rocks.tbog.tblauncher W/IconPack: Drawable `oneplus_care` for ComponentInfo{oneplus.consumer.android/servify.android.consumer.splash.SplashActivity} not found
2020-04-19 17:24:38.377 30919-30975/rocks.tbog.tblauncher W/IconPack: Drawable `twrp` for ComponentInfo{me.twrp.twrpapp/me.twrp.officialtwrpapp.activities.MainActivity} not found
2020-04-19 17:24:38.379 30919-30975/ro
@TBog
TBog / replay.sh
Last active May 12, 2021 10:15
Replay an upgarde log. Send log archive name as parameter.
#!/bin/bash
UNPACK_THEN_EXIT=""
CLEANUP="yes"
TIMING="yes"
filename=""
POSITIONAL=()
while [[ $# -gt 0 ]]
do
@TBog
TBog / update.sh
Last active May 15, 2020 16:15
Upgrade and save log output for future replay
#!/bin/bash
SCRIPT_DIR=$(cd `dirname $0` && pwd)
# if not root, run as root
if (( $EUID != 0 )); then
echo sudo $SCRIPT_DIR/`basename $0` "$@"
sudo $SCRIPT_DIR/`basename $0` "$@"
exit
fi