Skip to content

Instantly share code, notes, and snippets.

View DmitryMiroshnichenko's full-sized avatar

Dmitry Miroshnichenko DmitryMiroshnichenko

View GitHub Profile
@DmitryMiroshnichenko
DmitryMiroshnichenko / gist:48b966e70534acf30f41aa4a414c3f78
Last active July 26, 2016 19:51
OpenVBX update from repo script
#! /bin/bash
#
# A script that will upgrade the version of OpenVBX that resides in the /OpenVBX
# directory, back-up the database, copy the current version for backup and replace
# it with the develop branch. The old version is not deleted.
#
# Used for testing, not approved for production!
# Does not take 3rd party plugins in to account.
# customize this for your install
DBHOST='***'
#! /bin/bash
#
# A script that will upgrade the version of OpenVBX that resides in the /OpenVBX
# directory, back-up the database, copy the current version for backup and replace
# it with the develop branch. The old version is not deleted.
#
# Used for testing, not approved for production!
# Does not take 3rd party plugins in to account.
# customize this for your install
jQuery(document).ready(function(){
console.log(window.location.href);
if (window.location.href == "http://pvdb.ru/question/")
{
jQuery("#reply-title").text("Задать вопрос");
jQuery(".comment-form-comment").children("label").text("Вопрос");
jQuery("#submit").val("Отправить вопрос");
}
});
jQuery(document).ready(function(){
var currentDate = new Date();
var day = currentDate.getDay();
var hour = currentDate.getHours();
var targetURL = "http://pvdb.ru/live/";
if (day == 7 && hour >= 17 && hour < 19)
{
window.location.href = targetURL;
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
apt-get -y install git
git clone https://gist.github.com/52816fa390eb681b6d83.git
cd 52816fa390eb681b6d83
@DmitryMiroshnichenko
DmitryMiroshnichenko / installOpenVbx.sh
Last active July 15, 2017 19:16 — forked from dwelch2344/installOpenVbx.sh
A simple install script to setup OpenVbx on an Debian for Google Compute Engine
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
export DBNAME="openvbxexmpl"
export DBUSER="openvbx"
export DBPASS="openVbxSecretPass"