From the man pages:
-
Single port:
nc -zv 127.0.0.1 80
-
Multiple ports:
nc -zv 127.0.0.1 22 80 8080
#!/bin/bash | |
# | |
# see: http://blog.tomtung.com/2009/11/cowsay-fortune | |
# http://www.commandlinefu.com/commands/view/3584/remove-color-codes-special-characters-with-sed | |
# https://github.com/busyloop/lolcat | |
# https://github.com/dorentus/mruby-lolcat-bin | |
# | |
# requires `fortune`, `cowsay`, | |
# and ruby gem `lolcat` or its mruby version equivalent |
version: '3.9' | |
services: | |
rdu: | |
image: your/image/here | |
ports: | |
- "50000:50000" | |
- "8443:8443" | |
- "49540:49540" | |
environment: | |
- "JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,address=49540,server=y" |
# https://blog.mimacom.com/artifactory-latest-version/ | |
curl -s $(curl -s $(curl -s "$ARTIFACTORY_URL/$REPO_URL?lastModified" | jq -r '.uri') | jq -r '.downloadUri' ) | |
# with basic auth and defining output directory | |
curl -u$ARTIFACTORY_USER:$ARTIFACTORY_TOKEN -O --output /tmp -s ... |
# Credit http://stackoverflow.com/a/2514279 | |
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r |
git checkout branch_to_be_renamed | |
git branch -m branch_to_be_renamed new_branch_name | |
git push origin --delete branch_to_be_renamed | |
git push origin -u new_branch_name | |
###### | |
# -u, --set-upstream | |
# For every branch that is up to date or successfully pushed, add upstream (tracking) | |
# reference, used by argument-less git-pull(1) and other commands. For more information, see | |
# branch.<name>.merge in git-config(1). |
grep -rnw . -e 'TEXT TO FIND' |
sed -r 's/\"(R\$\s*)([0-9]{0,})\.?([0-9]{0,})\.?([0-9]{1,})\.?([0-9]{0,3})\"/\2\3\4\5/g' input.json > output.json |
# text can be anything, 'ccow' below is an alias for: | |
# alias ccow='fortune | cowsay | lolcatjs' | |
convert | |
-size 500x500 \ | |
xc:lightblue \ | |
-font Courier -pointsize 12 \ | |
-fill blue \ | |
-gravity Northwest \ | |
-draw "text 0,0 '$(ccow)'" \ | |
image.png |