Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo -e "This script will do \e[1minitial setup of VPS with Ubuntu 18.04\e[22m (from OVH, but will also work with many others)" | |
echo "" | |
echo -e "\e[1mDefining required parameters\e[22m" | |
echo -ne "Please enter \e[1mIP address\e[22m of new VPS: " && read vps_ip | |
echo -ne "Please enter \e[1musername\e[22m to create main user in your new VPS:" && read username | |
echo -e "'\e[38;2;255;127;0mNot asking for passwords, you will be prompted as required\e[39m" | |
echo "" | |
echo -e "Connecting to new VPS as \e[1mroot\e[22m first time" | |
echo -e "You will need to enter password that you should have received by e-mail from OVH" | |
ssh root@$vps_ip username='$username' /bin/bash <<'EOT' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import sys | |
import os | |
# import site | |
# site.addsitedir('/usr/local/lib/python2.7/site-packages') | |
from PyQt5 import QtCore, QtWidgets, QtWebEngineWidgets | |
app = QtWidgets.QApplication(sys.argv) | |
view = QtWebEngineWidgets.QWebEngineView() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import urllib2 | |
json.loads(urllib2.urlopen("http://rate-exchange.appspot.com/currency?from=EUR&to=RUB").read())['rate'] |