curl ifconfig.co
curl icanhazip.com
curl ifconfig.me
curl http://smart-ip.net/myip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
========================================== ========================================== | |
TMUX COMMAND WINDOW (TAB) | |
========================================== ========================================== | |
List tmux ls List ^b w | |
New new -s <session> Create ^b c | |
Attach att -t <session> Rename ^b , <name> | |
Rename rename-session -t <old> <new> Last ^b l (lower-L) | |
Kill kill-session -t <session> Close ^b & |
A quick guide on how to setup Node.js development environment.
nvm allows installing several versions of Node.js to the same system. Sometimes applications require a certain versions of Node.js to work. Having the flexibility of using specific versions can help.
- Open new Terminal window.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### your registry must have the following environment var set | |
# REGISTRY_STORAGE_DELETE_ENABLED=true | |
### replace YOUR_SERVER with corect info | |
REGISTRY_URL=https://YOUR_SERVER:5000 | |
### host registry volume folder | |
REGISTRY_ROOT=/registry | |
### container to execute garbage-collect | |
CONTAINER_NAME=services_registry.1 |
UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker
now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.
Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/
sudo amazon-linux-extras install docker
sudo service docker start
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# install PPA | |
sudo add-apt-repository ppa:deadsnakes/ppa | |
# update and install | |
sudo apt update | |
sudo apt install python3.8 python3.8-dev python3.8-venv | |
# setup alternatives |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# SPDX-License-Identifier: MIT License | |
# Steps: | |
# 1) Make sure bash is available | |
# 2) Create udev rule | |
# - path to new udev rule: /etc/udev/rules.d/50-x-resize.rules | |
# - udev rule content: | |
# ACTION=="change",KERNEL=="card0", SUBSYSTEM=="drm", RUN+="/usr/local/bin/x-resize" | |
# 3) Create /var/log/autores directory | |
# 4) Create script /usr/local/bin/x-resize (this file) and make executable |