(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:
| const fs = require("fs"); | |
| let numberOfProcesses = 1; | |
| let maxMemory = 64; | |
| // use number of cpus from config.json on grid | |
| if (fs.existsSync("/run/config.json")) { | |
| const pshConfig = require("/run/config.json"); | |
| numberOfProcesses = Math.ceil(pshConfig.info.limits.cpu); | |
| maxMemory = pshConfig.info.limits.memory; | |
| } |
| # ----------------------------------------------- | |
| # BEFORE USING THIS SCRIPT | |
| # ----------------------------------------------- | |
| # 1 - Create a file in /etc/<yourpassfile>.pass which contains the vpn private key password. | |
| # 2 - Set permission for the file: 'sudo chmod 600 /etc/<yourpassfile>.pass' - Owner can read and write. | |
| # 3 - Create an alias in your .bashrc or bash_profile: alias vpn="sudo sh <path to your script>". | |
| # 4 - Set the value of the variable OVPN_FILE_PATH with the path of the .ovpn file. | |
| # 5 - Set the value of the variable OVPN_PRIVATE_KEY_FILE_PATH with the path of the created file in step #1: /etc/<yourpassfile>.pass | |
| # 6 - OPTIONAL: avoid password when executing the script, add this to /etc/sudoers '<your username> ALL=(ALL:ALL) NOPASSWD:<path to your script>' |
| # get total requests by status code | |
| awk '{print $9}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | |
| # get top requesters by IP | |
| awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head | awk -v OFS='\t' '{"host " $2 | getline ip; print $0, ip}' | |
| # get top requesters by user agent | |
| awk -F'"' '{print $6}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head | |
| # get top requests by URL |
| In a privileged cmd.exe: | |
| lxrun /uninstall /full | |
| sc stop lxssmanager | |
| rmdir /S %LOCALAPPDATA%\lxss | |
| optionalfeatures.exe --> uncheck "Windows Subsystem for Linux (Beta)" | |
| // create file: | |
| sudo vim /usr/share/applications/intellij.desktop | |
| // add the following | |
| [Desktop Entry] | |
| Version=13.0 | |
| Type=Application | |
| Terminal=false | |
| Icon[en_US]=/home/rob/.intellij-13/bin/idea.png | |
| Name[en_US]=IntelliJ |
As configured in my dotfiles.
start new:
tmux
start new with session name: