Skip to content

Instantly share code, notes, and snippets.

View KevinLiebergen's full-sized avatar
🎯
Focusing

KevinLiebergen

🎯
Focusing
View GitHub Profile
Loggear con root desde la pantalla de inicio de sesión en Gnome 3 que por defecto viene deshabilitado
$ sudo vim /etc/pam.d/gdm-password
Comentar
#auth required pam_succeed_if.so user != root quiet_success
Progress tool - Mostrar barra de progreso a la hora de realizar comando largos
$ sudo apt install progress
$ cp -r VirtualBox\ VMs virtual-bak | progress -m
Strings
-e Unicode strings, if they are UTF-8, might show up in the search for ASCII strings. But to search for other encodings use -e
-o Print the offset within the file before each string
@KevinLiebergen
KevinLiebergen / Reduce múltiples líneas en blanco en vim
Last active March 4, 2020 10:55
Sustituir desde vim varias lineas en blanco por una sola
2 modos diferentes:
Sustituye en todo el fichero (:%s`) 3 o más saltos de línea (`\n\n\n\+`) por 2 (`\r\r`) y en la línea actual (`/g`), separado por `/`.
:%s/\n\n\n\+/\r\r/g
Ejecutando el comando cat al propio fichero con el parámetro -s (Suppress repeared empty output lines)
:%!cat -s
@KevinLiebergen
KevinLiebergen / my .conkyrc
Created January 25, 2020 13:11
conkyrc with the settings for my own laptop
background no
font Snap.se:size=8
xftfont Snap.se:size=8
use_xft yes
xftalpha 0.1
update_interval 3.0
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
@KevinLiebergen
KevinLiebergen / Bindsym config volume i3wm
Last active November 20, 2019 22:26
For debian based distros
For debian based distros
- Add it to your .config/i3/config (Shortcut = Ctrl+Win+Alt Up/down )
- `Win+Shift+r` to reload i3 config
bindsym $mod+Control+Mod1+Up exec amixer -q set Master 10%+ unmute
bindsym $mod+Control+Mod1+Down exec amixer -q set Master 10%- unmute
## For brightness control
bindsym XF86MonBrightnessUp exec xrandr --output eDP-1 --brightness $(echo "$(xrandr --verbose |grep Brightness |grep -o '[0-9].*')+0.1" | bc)
@KevinLiebergen
KevinLiebergen / delete-lines-char-repeated
Created October 13, 2019 15:55
Comando para borrar lineas con letras repetidas
$ sed -e '/\(.\).*\1/d' file.txt > new-file.txt
@KevinLiebergen
KevinLiebergen / Customized green prompt
Last active October 4, 2019 17:40
Customized prompt
export PS1="\[\e[32m\]\u\[\e[m\]\[\e[32m\]@\[\e[m\]\[\e[32m\]\h\[\e[m\] \[\e[32m\][\[\e[m\] \w \[\e[32m\]]\[\e[m\]\[\e[32m\]\\$\[\e[m\] "