Whether you need to change a proxmox node’s ip or change the hostname, the steps are the same. In my particular case, I have two networks, a fast network and a faster network, so I wanted to switch all my proxmox hosts to use the ip address associated with the faster network interface … to do that
For each node in the cluster, change the /etc/hosts file and make sure each hosts new ip address is associated with its name.
For each host, go ahead and run the following command
Set the user agent for phantomjs driver
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
dcap = dict(DesiredCapabilities.PHANTOMJS)
dcap["phantomjs.page.settings.userAgent"] = (
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/53 "
"(KHTML, like Gecko) Chrome/15.0.87"
driver = webdriver.PhantomJS(desired_capabilities=dcap)
Permalink to this post
(60 words, estimated 14 secs reading time)
Have you ever had a csv (comma separated file) file that you wanted to see nicely and did not want to open up a spreadsheet editor just to be able to see it in a readable way. Well the following command works with most csv files and will do just that:
If you have commas within your data you might want to use the following longer but handy linux command:
python -c 'import sys,csv; c = csv.reader(sys.stdin); [sys.stdout.write("^M".join(map(repr,r))+"\n") for r in c];' <tmp .csv | column -s '^M' -t