How to check the remote file whether it exists?
Check the remote file whether it exists ssh -q ubuntu@10.10.10.10 [[ -f /etc/nginx/conf.d/test.conf ]] && echo “true” || echo “false”
Check the remote file whether it exists ssh -q ubuntu@10.10.10.10 [[ -f /etc/nginx/conf.d/test.conf ]] && echo “true” || echo “false”
aws codebuild create-webhook –project-name –filter-groups “[[{\”type\”:\”EVENT\”,\”pattern\”:\”PULL_REQUEST_MERGED\”}]]”
Easy steps to install spotify with Snap on Fedora 28, Enjoy! sudo dnf install snapd sudo ln -s /var/lib/snapd/snap /snap sudo snap install spotify sudo ln -s /var/lib/snapd/snap/bin/spotify /usr/bin/spotify
When you want to download some video from youtube with favorite tool youtube-dl, but this error shows up. That means the youtube-dl version that you’re using needs to be updated. This is how to install the latest version of youtube-dl : sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl sudo chmod a+rx /usr/local/bin/youtube-dl Or if you installed … Read more
Scan network : nmap -sP 172.16.0.56/24
Here’s how to push your local docker image to your GCR (Google Cloud Repository). You might want to use your own docker image later for your containerized app or kubernetes. For this research, I use Ubuntu 18.04.03 LTS Install gcloud, see the full instructions here : https://cloud.google.com/sdk/docs/quickstarts Once you’ve installed the gcloud, … Read more
Install redshift with dnf or yum: sudo dnf install redshift Apply screen reduction redshift -O 2500 Reset the setting redshift -x
This is one of the coolest trick I’ve ever seen when working with VIM. This plugin allows you to run the bash terminal inside the VIM. And you can actually make it a spitted pane within your VIM work space. Check out this plugin: How to install conque-shell: Open vim config: vim ~/.vimrc call plug#begin(‘~/.vim/plugged’) … Read more
find -maxdepth 1 -size 0 -print | xargs rm The last statement, xargs rm is optional. If this defined, then the it will remove those zero-bytes files immediately in a one-liner.
export AWS_PROFILE=profile_name