Skip to content

Instantly share code, notes, and snippets.

View silenci's full-sized avatar

Humbert Simon silenci

View GitHub Profile
@silenci
silenci / disable_vim_auto_visual_on_mouse.txt
Last active March 9, 2022 08:47 — forked from u0d7i/disable_vim_auto_visual_on_mouse.txt
Disable vim automatic visual mode on mouse select
Disable vim automatic visual mode on mouse select
issue: :set mouse-=a
add to ~/.vimrc: set mouse-=a
my ~/.vimrc for preserving global defaults and only changing one option:
source $VIMRUNTIME/defaults.vim
set mouse-=a
Add this to .bashrc. The first one shows all container information and the second is an alias to workaround the error "lxc-attach: relocation error: /lib/x86_64-linux-gnu/libnss_files.so.2: symbol __libc_readline_unlocked, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference" which happens when you use containers with modern linux distros in old lxc hosts (lxc version 1.0.6).
alias lxc-ls='lxc-ls -f'
lxc-shell() {
#do things with parameters like $1 such as
lxc-attach -n "$1" -- /bin/bash
}
@silenci
silenci / gist:2f35c371fd32cc3a72a4c7518e74ec35
Created November 19, 2017 20:37 — forked from t3chnoboy/gist:8322246
Convert all files in folder to utf-8 using iconv
# http://stackoverflow.com/questions/4544669/batch-convert-latin-1-files-to-utf-8-using-iconv
find . -type f -exec bash -c 'iconv -f iso-8859-1 -t utf-8 "{}" > /path/to/destination/"{}"' \;