Home

  • PHP Enum

    Types Built-in Static Function Enum::cases() Built-in Attribute Enum::CASE->name Enum::CASE->value


  • SSH Forwarding

    Forward local socket /tmp/mysqld.sock to remote socket /var/run/mysqld/mysqld.sock Forward local port 5555 to remote socket /var/run/mysqld/mysqld.sock Forward local port 5555 to remote port 8080 Forward traffic from remote port 8080 to local port 80


  • MySQL/MariaDB Query Log

    Query log is disabled by default. To enabled it non-persistent way (will be disabled when you restart): By default, the general query log is written to ${hostname}.log in the datadir directory. In my case this is /var/lib/mysql. To change the file name format: To save it to TABLE instead of FILE: To read from the…


  • Stream Editor (sed)

    To insert/append to file (Linux) Apply the change to the file (Linux) To insert/append to file (MacOS) Apply the change to the file (MacOS)


  • Neovim: Netrw Shortcut Mapping


  • Netrw: Copy Paste

    Paste to different folder Paste to same folder To unset copy/move target :mt all you have todo is go to netrw’s header ” ==================== and type :mt