Skip to content

Instantly share code, notes, and snippets.

View nstrappazzonc's full-sized avatar
🏠
Working from home

Nicola Strappazzon C. nstrappazzonc

🏠
Working from home
View GitHub Profile
@nstrappazzonc
nstrappazzonc / karabiner-readme.md
Last active March 28, 2021 09:40
Custom mapping in MAX OS X

Custom keyboard mapping

  • Re-Map Grave key to Esc for fucking touch bar in the Macbook Pro.
  • Change second display brightness and contrast with fn + 3 to 7.
  • Launcher applications: Activity Monitor, Firefox, iTerm and Spotify.
  • Select area to take screenshot.
  • Lock session.
  • Paste without format.

Requirements

@nstrappazzonc
nstrappazzonc / proxysql.md
Last active February 15, 2023 15:03
ProxySQL commands

ProxySQL Commands

Servers

Add

The server require fill two tables; mysql_replication_hostgroups and mysql_servers. The first table define who is use for write and who is for reads, and the id number for each, for example any master: [10, 20, 30, 40] and all slave: [11, 12, 13, 21, 22, 23]. The second table is for the server list associated with mysql_replication_hostgroups.

@nstrappazzonc
nstrappazzonc / vim.md
Last active March 19, 2023 10:23
VIM shortcuts, my personal guidelines
@nstrappazzonc
nstrappazzonc / mysql_queries_for_dba.md
Last active July 28, 2022 15:14
MySQL queries for DBA

MySQL queries for DBA

Tables size

SELECT table_schema as "Database",
       table_name AS "Table", 
       round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB"
FROM information_schema.TABLES 
ORDER BY (data_length + index_length) DESC;
@nstrappazzonc
nstrappazzonc / tmux.md
Last active July 13, 2020 14:24
Tmux shortcuts, my personal guidelines
@nstrappazzonc
nstrappazzonc / mysql_ssh_variables.sh
Last active July 10, 2019 09:58
Send local env variables to server through by ssh
_ssh_completions()
{
cur="${COMP_WORDS[COMP_CWORD]}"
opts=$(grep '^Host' ~/.ssh/config ~/.ssh/config.d/* 2>/dev/null | grep -v '[?*]' | cut -d ' ' -f 2-)
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
}
complete -F _ssh_completions s
s() {