- Create a
Python27
app in Openshift
create a python2.7
application in openshift
if you still don't uploaded the ssh publickey to openshift, then doit:
<form method='post' onsubmit="return validateFormOnSubmit(this)" action=''> | |
.... | |
<input type="submit" value="ok"> | |
</form> | |
<script> | |
var allowSubmit = true; | |
function validateFormOnSubmit(theForm) { | |
//prevent multiple submit by restricting submit per 4seconds | |
if (!allowSubmit){ |
from django.forms import EmailField | |
from django.core.exceptions import ValidationError | |
def isEmailAddressValid( email ): | |
try: | |
EmailField().clean(email) | |
return True | |
except ValidationError: | |
return False |
Python27
app in Openshiftcreate a python2.7
application in openshift
if you still don't uploaded the ssh publickey to openshift, then doit:
Much nicer solution can be used for any stackexchange sites::: First, go to stackoverflow.com(or any other stackexchange sites) then define this in your Javascript console(Press F12):
function minec(){
$.getJSON('/unicoin/rock',function(data) {
setTimeout(function(){
$.post('/unicoin/mine?rock='+data.rock,{fkey:StackExchange.options.user.fkey})
.done(function( data ) {
console.log(data);
});
ssh root@104.131.108.244
install apache
, git
,mod-wsgi
,mysql
and some python packages such as pip
,virtualenv
and python-dev
create a file /etc/nginx/conf.d/virtual.conf
#
# A virtual host using mix of IP-, name-, and port-based configuration
#
server {
listen 8080;
server_name chat.djangoer.com;
to kill all process:
killall -9 <name>
to copy file to server:
scp <filename> root@djangoer.com:
to get disk usage: