Skip to content

Instantly share code, notes, and snippets.

@strohel
strohel / dump.sh
Last active June 1, 2023 09:13
Dump Linux kernel and boot info
#!/bin/bash
dmesg --notime > dmesg.txt
sort dmesg.txt > dmesg.sorted.txt
dmidecode > dmidecode.txt
fwupdmgr get-bios-setting > fwupdmgr-get-bios-setting.txt
fwupdmgr get-devices > fwupdmgr-get-devices.txt
lsmod | sort > lsmod.txt
lspci -k > lspci-k.txt
lsusb -t > lsusb-t.txt
@strohel
strohel / .bashrc
Last active October 2, 2016 22:52
$HOME -> .configs
#!/bin/bash
# This line was appended by KDE
# Make sure our customised gtkrc file is loaded.
export GTK2_RC_FILES="$HOME/.gtkrc-2.0:$HOME/.kde/share/config/gtkrc-2.0:/etc/gtk-2.0/gtkrc"
export EDITOR="mcedit"
export PATH=$KDEDIR/bin:/usr/lib/ccache/bin:$HOME/stuff/skripty:$HOME/downloads/google_appengine:$PATH
export PKG_CONFIG_PATH=$HOME/kde/lib/pkgconfig
export VALGRIND_OPTS="--num-callers=50 --suppressions=$HOME/projekty/kde-dev-scripts/kde.supp"
@strohel
strohel / 20-intel.conf
Last active November 15, 2016 13:58
/etc/X11/xorg.conf.d/
Section "Device"
Identifier "Device0"
Driver "intel"
Option "AccelMethod" "SNA"
# prevent KDE Plasma CPU usage, https://wiki.gentoo.org/wiki/Intel#KDE.27s_plasma_eating_CPU
Option "TearFree" "true"
EndSection
@strohel
strohel / edgy-4.19.27
Last active March 26, 2019 16:10
Kernel config
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.19.27-gentoo-r1 Kernel Configuration
#
#
# Compiler: gcc (Gentoo 8.2.0-r6 p1.7) 8.2.0
#
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=80200
@strohel
strohel / make.conf
Last active March 31, 2019 08:20
/etc/portage
CFLAGS="-O2 -pipe -march=native -ggdb"
CXXFLAGS="${CFLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="x86_64-pc-linux-gnu"
USE="mmx sse sse2 -static-libs caps -tcpd bash-completion -ldap lzma \
networkmanager gstreamer git -dso lm_sensors declarative \
xcomposite syslog qalculate xinerama kipi thumbnail theora threads \
#!/bin/sh
# Run
# chown root:root per_device_routing_tables.sh
# chmod 700 per_device_routing_tables.sh
#
# or NM will refore to run the script.
# Then move the script to /etc/NetworkManager/dispatcher.d
export PATH="/bin:/sbin:/usr/bin:/usr/sbin"
@strohel
strohel / shl_install_efi_stub.sh
Created March 23, 2015 16:29
/usr/local/sbin/shl_install_efi_stub.sh
#!/bin/bash
DEFAULT_ARGS='pcie_aspm=force'
KERNEL_ARGS="${KERNEL_ARGS:-${DEFAULT_ARGS}}"
for file in /boot/vmlinuz-*; do
if [ "$file" == '/boot/vmlinuz-*' ]; then
echo "Nothing to do"
continue
fi
@strohel
strohel / kwrite-silent
Created March 23, 2015 15:59
/usr/local/bin/kwrite-silent
#!/bin/sh
kwrite 2>/dev/null $@
@strohel
strohel / shlinstallkernel.sh
Created March 22, 2015 10:01
Script to install kernel binary to /boot
#!/bin/bash
bootdir="/boot"
installfiles=".config arch/x86/boot/bzImage"
cdpath=/usr/src/linux
grub_config=grub2-mkconfig
testfile() {
if [ ! -r "$1" ]; then
echo "$1" not found