These days Linux supports a lot of devices. However, occasionally you will find a device that works but only for a while, requiring a reboot to work again. This is often due to the device itself not behaving according to the USB standard, and that's more often than not caused by misbehaving USB suspend.
The proper way of fixing this would be either a workaround in the driver or, God forbid, a fix in the device's firmware. But quite often nobody does anything, so what's left is to do the improper. And the easiest improper fix is to disable USB autosuspend.
For the command line, just add usbcore.autosuspend=-1 to GRUB_CMDLINE_LINUX_DEFAULT:
sudo sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="[a-z ]*/& usbcore.autosuspend=-1/' /etc/default/grub| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| sudo gpg --homedir /tmp --no-default-keyring --keyring /usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF | |
| echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list | |
| echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee -a /etc/apt/sources.list.d/mono-official-stable.list |
| xprop -id $xid -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x0, 0x0, 0x0" |
| /* compile with: | |
| on linux: gcc -g stack_traces.c | |
| on OS X: gcc -g -fno-pie stack_traces.c | |
| on windows: gcc -g stack_traces.c -limagehlp | |
| */ | |
| #include <signal.h> | |
| #include <stdio.h> | |
| #include <assert.h> |
| using System; | |
| namespace YourChoice | |
| { | |
| public static class TimeHelpers | |
| { | |
| public static DateTime FromEpochTime(this long unixTime) | |
| { | |
| var epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); | |
| return epoch.AddSeconds(unixTime); |
| Requires -RunAsAdministrator | |
| ############ | |
| # This script will add your WSL environments to the Windows Defender exclusion list so that | |
| # realtime protection does not have an adverse effect on performance. | |
| # | |
| # You should be aware that this could make your system less secure. Use at your own risk. | |
| # Note: This should be run from an administrative PowerShell prompt | |
| ############ |
List of oldest supported version of top 10 Linux Distros and their glibc version according to distrowatch.com.
Out of all versions with published EOLs, 2.12 is the oldest glibc still active, found in CentOS 6.8.
If CentOS 6 and 7 are eliminated, the oldest glibc is 2.23 in Ubuntu and Slackware.
| Nginx Tip 1. – Organize Nginx Configuration Files | |
| Normally Nginx configuration files are located under /etc/nginx path. | |
| One good way to organize configuration files is use Debian/Ubuntu Apache style setup: | |
| ## Main configuration file ## | |
| /etc/nginx/nginx.conf | |
| ## Virtualhost configuration files on ## | |
| /etc/nginx/sites-available/ |