How to run ansible playbook
It’s so hard for me to memorize all of these things, so I will write it down, like this ansible command ansible-playbook -i hosts.ini playbook/yourplaybook/create.yml
It’s so hard for me to memorize all of these things, so I will write it down, like this ansible command ansible-playbook -i hosts.ini playbook/yourplaybook/create.yml
If you wondering how to convert a video only from command line. These steps are recommended to achieve that. First you need to install ffmpeg in your system. Centos/Fedora: $ sudo dnf install ffmpeg Ubuntu: $ sudo apt install ffmpeg And proceed to convert your desired video: $ ffmpeg -i input.mp4 -vcodec copy -acodec copy … Read more
To edit cronjob: $ crontab -e cronjob cheat: Do the job every 5 menit */5 * * * * do.sh
Vagrant init $ mkdir vagrant-test-box $ cd vagrant-test-box $ vagrant box add bento/centos-7.3 $ vagrant init bento/centos-7.3 $ vagrant up Check vagrant box $ vagrant box list
Simple tunneling with ssh with port forwarded to connect your service locally. Make sure your local port is available first. $ ssh -f user@website.com -L 2000:website.com:5432 -N
Just an example of Vagrantfile in case I need it. you can also use it. $ mkdir vagrant ~/vagrant:~$ touch Vagrantfile ~/vagrant:~$ vagrant up Vagrantfile: # -*- mode: ruby -*- # vi: set ft=ruby : Vagrant.configure(“2”) do |config| config.vm.box = “ubuntu/xenial64” config.vm.network “private_network”, ip: “192.168.56.11” config.vm.provider “virtualbox” do |vb| vb.memory = “2048” end config.vm.provision :shell, … Read more
This example using Centos with nginx on it $ wget https://dl.eff.org/certbot-auto $ chmod a+x certbot-auto $ sudo ./certbot-auto –authenticator webroot –installer nginx
:%s/foo/bar/g # replace string v # open new file to vplit window from netrw gf # go to file (current window) from netrw y # yank/copy lines p # paste from yanked/clipboard gg # go to top GG # go to bottom % # match bracket Ctrl-e # open Vexplorer left side after new tab :1316 # go to line number
highlight Cursor guifg=white guibg=black highlight iCursor guifg=white guibg=steelblue set guicursor=n-v-c:block-Cursor set guicursor+=i:ver100-iCursor set guicursor+=n-v-c:blinkon0 set guicursor+=i:blinkwait10 set mouse=a autocmd TextChanged,TextChangedI <buffer> silent write set clipboard=unnamedplus set paste set nu set tabstop=4 noremap <S-s> :w <Enter> let g:netrw_banner = 0 let g:netrw_liststyle = 3 let g:netrw_browse_split = 4 let g:netrw_altv = 1 let g:netrw_winsize = 25 … Read more
Install Gcloud Reference : https://cloud.google.com/sdk/docs/install-sdk Download and install gcloud tar -xf google-cloud-cli-459.0.0-linux-x86_64.tar.gz ./google-cloud-sdk/install.sh