docker-machine start node_name;
docker-machine stop node_name;
docker-machine ls;
docker-machine ip node_name;
Supposed that https://github.com/nhthai2005/DNS-Server.git Get started by creating a new file or uploading an existing file. We recommend every repository include a README, LICENSE, and .gitignore.
echo "# DNS-Server" >> README.md git init git add README.md git commit -m "first commit" git branch -M master
Vagrant.configure("2") do |config| | |
config.ssh.insert_key = false | |
config.vm.box = "centos/7" | |
config.vm.network "private_network", ip: "192.168.99.2" | |
config.vm.hostname = "ansible" | |
config.vm.synced_folder ".", "/vagrant", type: "virtualbox" | |
config.vm.provider "virtualbox" do |vb| | |
vb.name = "Ansible-Playbooks" | |
vb.cpus = 2 | |
vb.memory = "4096" |
One method uses the command certutil in the command prompt window. For example:
certutil -hashfile c:\Users\JDoe\Desktop\abc.exe SHA512
This command returns the SHA512 hash of file abc.exe located at the specified file path. You may use other values after SHA, such as 1 or 256, to produce the corresponding hash, and you may substitute MD5 or other supported parameters.
Another method is to use Windows PowerShell (version 5.1 for me) with the command Get-FileHash:
#!/bin/bash | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose |
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the \
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)Here are some other keyboard shortcuts for working with panes:
# How to cycle through reverse-i-search in BASH? | |
# vi ~/.inputrc | |
"\e[A": history-search-backward | |
"\e[B": history-search-forward |
#!/bin/bash | |
git restore * | |
git clean -fd | |
git reset --hard |