CREATE PROXY
ssh -D 9000 -q -C -N -f bridge_host.domain.tld
SETUP SSH (add this in ~/.ssh/config)
Host target.host.domain.tld
ProxyCommand=nc -X 5 -x localhost:9000 %h %p
CONNTECT TO SSH HOST target.host.domain.tld
ssh -l user target.host.domain.tld
CREATE PROXY
ssh -D 9000 -q -C -N -f bridge_host.domain.tld
SETUP SSH (add this in ~/.ssh/config)
Host target.host.domain.tld
ProxyCommand=nc -X 5 -x localhost:9000 %h %p
CONNTECT TO SSH HOST target.host.domain.tld
ssh -l user target.host.domain.tld
If you want/need to get the given Published Port for a given target port in a docker service you can use:
docker service inspect SERVICE_NAME --format='{{range .Endpoint.Ports}}{{if eq .TargetPort 8080}}{{.PublishedPort}}{{end}}{{end}}'
Sometimes I need/have to sync a private repository with a public one, so this is what I usually do.
Add a new remote
git remote add github https://github.com/elastic/ansible-elasticsearch.git
Pull the new commits from master
git pull github master
Push new commits to origin
git push origin master
Push new tags
git push --tags origin
If you want/need to keep your python packages updated and you are using pip requirements you can use pip-upgrader to check the latest version of all your dependencies and upgrade them if needed it and don’t forget to use virtual environments
Happy Coding!
At work I’m using git [git version 2.15.0.windows.1] + cgywin , some git commands like diff or log throw an exception and I got this message on the console [main] cygwin_exception::open_stackdumpfile: Dumping stack trace to less.exe.stackdump
To fix this error you have to change the value of $TERM to xterm, previously was screen (collateral damage? I don’t know yet xD)
export TERM=xterm
To install all Go project dependencies at once.
go get ./...
To run all the unit-test at once
go test ./...