Skip to content

Instantly share code, notes, and snippets.

View gvital3230's full-sized avatar

Goncharov Vitalii gvital3230

View GitHub Profile
@gvital3230
gvital3230 / gist:3ee1561f835421d30d675047d7fd556d
Last active June 4, 2023 09:23
vim command to print hex codes of icons in Lunarvim icons.lua

If you use custom font. icons in LunarVim could look broken. Use this command to display what UTF codes uses Lunarvim for icons. After taht use it in https://sw.kovidgoyal.net/kitty/conf/#opt-kitty.symbol_map to map that UTF codes ranges to some Nerd Font. So, you do not need to patch our font and use its ligatures as well

First - open icons file in Lunarvim folder

lvim ~/.local/share/lunarvim/lvim/lua/lvim/icons.lua

Then activate command mode and apply this command

@gvital3230
gvital3230 / docker-postgresql-restore.sh
Last active June 5, 2023 18:12
[docker postgresql plain restore] #docker #postgresql
cat $BACKUP_FILE | docker exec -i $CONTAINER psql -U $DB_USERNAME -d $DB
@gvital3230
gvital3230 / docker-msqldump.sh
Last active June 5, 2023 18:12
[docker mysqldump] #docker #mysql
docker container exec -i $CONTAINER-NAME mysqldump -u $USER -p $DATABASE | gzip > $DATABASE-$(date +%F_%T).sql.gz
@gvital3230
gvital3230 / mysqlrestore.sh
Last active June 5, 2023 18:12
[docker mysql restore] #docker #mysql
#Mac OS
gunzip -c $BACKUP_FILE_NAME | docker container exec -i $CONTAINER_NAME mysql -u $DB_USER -p $DB_PASSWORD $DATABASE
#Lunux
zcat $BACKUP_FILE_NAME | docker container exec -i $CONTAINER_NAME mysql -u $DB_USER -p $DB_PASSWORD $DATABASE