Preferences > Key Bindings - User
[
{ "keys": ["ctrl+t", "ctrl+w"], "command": "toggle_setting", "args": {"setting": "word_wrap"}},
{ "keys": ["ctrl+alt+p"], "command": "prompt_select_workspace" }
]
> Preferences > Settings - User
http://stackoverflow.com/questions/24296212/php-nodejs-and-sessions#24303059 | |
You can use memcached as your session storage handler in PHP. Memcached is a simple key value store that can be accessed via TCP; there is a memcached module available for Node.js. | |
PHP stores the session in memcached by using the session id as the key. The session data (value) stored in memcached is a serialized PHP object, with a slight twist. You can read more about this unusual serialization at the SO question "Parse PHP Session in Javascript". Luckily though, there is already an NPM module out there: php-unserialize. | |
Now for the How-To. | |
Assumptions |
Preferences > Key Bindings - User
[
{ "keys": ["ctrl+t", "ctrl+w"], "command": "toggle_setting", "args": {"setting": "word_wrap"}},
{ "keys": ["ctrl+alt+p"], "command": "prompt_select_workspace" }
]
> Preferences > Settings - User
MacOS: Mojave 10.14.12
Install Java SE: https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.html
Download SchemaSpy: http://schemaspy.org/
Download PostgreSQL JDBC driver: http://jdbc.postgresql.org/download.html
Install pango: brew install pango
Install Graphviz: brew install graphviz --with-pango
CFLAGS="-I$(xcrun --show-sdk-path)/usr/include" pyenv install 3.7.0
git remote show origin | grep {pattern} | awk '{print $1}' | xargs git push origin -d
pt-kill user must have SUPER
PROCESS
permission.
The following command intends to kill queries which have execute time greater than 30s and save terminated queries to database.
pt-kill --host=localhost --user=pt_kill_user --password=pt_kill_pass \
--busy-time=30 --interval=5s \
--log-dsn=h=localhost,D=pt_kill,t=kill_log,P=3306,u=root,p=root \
--kill --daemonize --ignore-user=backup
Disable a service which starts automatically
sudo update-rc.d -f nginx disable
Space investigation:
Find top biggest directories under particular partition:
du -a /home/xxx | sort -n -r | head -n 5
To display the above result in human readable format:
du -Sh /home/xxx | sort -rh | head -5
getent group groupname
sudo gpasswd -a username sudo
| sudo usermod -aG sudo username
sudo adduser new_username
sudo userdel username
| Then remove user's folder if needed: sudo rm -r /home/username
or sudo deluser --remove-home username
gpasswd -d username group
usermod -l new_username old_username
sudo passwd username
sudo chsh username
username
to the line AllowUsers
in /etc/ssh/sshd_config
visudo
and add username
(same with root
)