Skip to content

Instantly share code, notes, and snippets.

View JonasAlfredsson's full-sized avatar
💭
youtu.be/ykuNZKOGPig

Jonas Alfredsson JonasAlfredsson

💭
youtu.be/ykuNZKOGPig
View GitHub Profile
@JonasAlfredsson
JonasAlfredsson / conf_grep.sh
Created February 21, 2020 13:13
Print all lines in a config file which are _not_ commented out (i.e. lines using #)
# Place this function inside your `.bashrc` or `.zshrc` file, source it, and use
# it by calling on it from your terminal like this:
#
# $ conf_grep settings-file.conf
#
# This will find and print a sorted list of all the lines which do _not_ have a
# pound/hashtag (#) sign at the beginning (leading spaces are ignored), i.e.
# print all lines which are not comments.
conf_grep ()
{
@JonasAlfredsson
JonasAlfredsson / respect_xorg_conf.md
Last active November 21, 2023 16:28
Make Cinnamon/Gnome respect the /etc/X11/xorg.conf file instead of ~/.config/displays.xml

Make Cinnamon/Gnome/Mate Respect xorg.conf

By default the Cinnamon/Gnome/Mate desktop environment loads its own display configuration from the file ~/.config/monitors.xml instead of using the settings defined in /etc/X11/xorg.conf. This can be a little bit annoying if you are using the nvidia-settings program to configure your displays (which will use xorg.conf), since anything entered there will be overridden by monitors.xml every reboot.

By doing the following changes we will disable the "Display Manager" in

@JonasAlfredsson
JonasAlfredsson / raspberry-install.md
Last active September 8, 2022 20:25
A short guide on how I installed my Raspberry Pi with a RTC (Real Time Clock).

raspberry-install

This is a short guide on how I installed my Raspberry Pi with a RTC (Real Time Clock) module so it can act as an NTP server as well.

Preparations

Before doing anything software related we need to obtain all the hardware

@JonasAlfredsson
JonasAlfredsson / install_python_debian.md
Last active June 3, 2024 20:47
Install custom version of Python on a Debian system.

A good guide on how to install whatever version of Python you want, on Debian, can be found in [this post][1] on StackExchange and on [sobyte][4]. However, the compact version of it is to move into your Downloads folder and run the following commands.

Side note: to be able to build all optional modules you will need to install [the following][3] dependencies:

sudo apt install \