Virtualenv: $ apt-get install virtualenv
Create an env and activate it:
$ virtualenv venv
$ source venv/bin/activate
""" Usage: | |
$ wget http://suhailvs.mooo.com/media/images/t1.sqlite3 | |
>>> import cracker as main | |
>>> main.save_a_pp() #"Generate Random Passphrase with salt a@b.c" | |
>>> main.show() # Show 10 items from Databse 'db.sqlite3' | |
>>> main.show(['l0Jl47s5','']) | |
>>> main.show(['','1MkupVKiCik9iyfnLrJoZLx9RH4rkF3hnA']) # warp wallet challenge2 | |
>>> main.manual() # manually input passphrase and salt | |
""" |
ssh root@104.131.108.244
install apache
, git
,mod-wsgi
,mysql
and some python packages such as pip
,virtualenv
and python-dev
Download Package Control
and use the Package Control: Install Package
command from the command palette.
The command palette is opened via ctrl+shift+p
.
Once you run the Package Control: Install Package
command, a list of packages will appear. Type in SFTP
and hit enter.
task/models
from django.db import models
class Task(models.Model):
completed = models.BooleanField(default=False)
title = models.CharField(max_length=100)
description = models.TextField()
from django.forms import EmailField | |
from django.core.exceptions import ValidationError | |
def isEmailAddressValid( email ): | |
try: | |
EmailField().clean(email) | |
return True | |
except ValidationError: | |
return False |
<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){ |
taken from here
sudo apt-get install nginx
The first step in creating a virtual host is to a create a directory where we will keep the new website’s information.