Skip to content

Instantly share code, notes, and snippets.

@pliski
pliski / gen_mirrorlist.sh
Created March 8, 2023 09:07
Generate a new list of mirrors for pacman using reflector
#!/bin/bash
# Generate a new list of mirrors for pacman using reflector.
# Should be executed with sudo privs.
# It assumes the existence of the drectory /etc/pacman.d/old/ containing the old versions of the mirrorlists.
# The path of this script should be /etc/pacman.d/gen_mirrorlist.sh
mv mirrorlist old/mirrorlist.$(date -d "today" +"%Y%m%d%H%M")
reflector --country 'Switzerland,' --save './mirrorlist' -p 'https,http'
chmod 0644 ./mirrorlist
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Ctrl-a R: tmux will self update with last changes of this file
CONFIG_FILE="${HOME}/.tmux.conf"
bind R source-file $CONFIG_FILE
# switch panes using Alt-arrow without prefix
@pliski
pliski / xorg.conf
Last active September 3, 2018 19:47
/etc/X11/xorg.conf
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 396.54 (buildd@lgw01-amd64-044) Tue Aug 21 18:18:46 UTC 2018
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" Below "Screen0"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "0"
@pliski
pliski / Xorg.1.log
Last active September 3, 2018 19:49
/var/log/Xorg.1.log: ubuntu 18.04 display disconnected
[ 16.302] _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
[ 16.302] _XSERVTransMakeAllCOTSServerListeners: server already running
[ 16.302] (--) Log file renamed from "/var/log/Xorg.pid-1244.log" to "/var/log/Xorg.1.log"
[ 16.303]
X.Org X Server 1.19.6
Release Date: 2017-12-20
[ 16.303] X Protocol Version 11, Revision 0
[ 16.303] Build Operating System: Linux 4.4.0-119-generic x86_64 Ubuntu
[ 16.303] Current Operating System: Linux myhostname 4.15.0-33-generic #36-Ubuntu SMP Wed Aug 15 16:00:05 UTC 2018 x86_64
[ 16.303] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.15.0-33-generic root=UUID=aaf37ec6-2c69-47a8-8afb-f31a0d98f5f5 ro quiet splash vt.handoff=1