Visit my blog or connect with me on Twitter
git init
or
Visit my blog or connect with me on Twitter
git init
or
import mechanize | |
from bs4 import BeautifulSoup as bs | |
from getpass import getpass | |
#USER CREDENTIALS | |
email = raw_input("email: ") | |
password = getpass("password: ") | |
#GETTING SOURCE CODE | |
browser = mechanize.Browser() |
from robobrowser import RoboBrowser | |
from getpass import getpass | |
from bs4 import BeautifulSoup as bs | |
browser = RoboBrowser(history=True) | |
browser.open('https://m.facebook.com/') | |
# GETTING INPUT | |
mail = input('Email : ') | |
password = getpass('Password : ') |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
Run this script to setup a working NGINX server proxying requests to the gunicorn server.
sudo
privilages.sudo bash nginx_deploy.sh
NGINX server config file
should already present be present in the directory.server_start
If you find that vagrant box list
somehow does not contain a box you previously had, you can sometimes add the box back if you still have the sources for it in ~/.vagrant.d/boxes
.
$ cd ~/.vagrant.d/boxes/precise64/0/virtualbox/
$ tar czf ~/precise64.box .
$ vagrant box add precise64 ~/precise64.box
Downloading box from URL: file:/Users/ryanuber/precise64.box
Extracting box...te: 417M/s, Estimated time remaining: --:--:--)
Successfully added box 'precise64' with provider 'virtualbox'!
[user] | |
name = Pavan Kumar Sunkara | |
email = [email protected] | |
[core] | |
editor = vim | |
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
excludesfile = ~/.gitignore | |
[sendemail] | |
smtpencryption = tls | |
smtpserver = smtp.gmail.com |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
(zenodo) manu@hp:~/src/zenodo$ ./scripts/setup-assets.sh
/home/manu/Envs/zenodo/local/lib/python2.7/site-packages/dojson/contrib/to_marc21/model.py:22: UserWarning: MARC21 undo feature is experimental
warnings.warn('MARC21 undo feature is experimental')
[2017-03-13 20:00:25,032] ERROR in app: Failed to initialize entry point: invenio_deposit_rest = invenio_deposit:InvenioDepositREST
Traceback (most recent call last):
File "/home/manu/Envs/zenodo/bin/zenodo", line 11, in <module>
load_entry_point('zenodo', 'console_scripts', 'zenodo')()
File "/home/manu/Envs/zenodo/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
return self.main(*args, **kwargs)
/home/manu/github/cwltool/venv3/bin/python3.5 /home/manu/Downloads/pycharm-2016.3.2/helpers/pydev/pydevd.py --multiproc --qt-support --client 127.0.0.1 --port 36690 --file /home/manu/github/cwltool/setup.py test
pydev debugger: process 19584 is connecting
Connected to pydev debugger (build 171.4163.6)
running pytest
Searching for mock>=2.0.0
Best match: mock 2.0.0
Processing mock-2.0.0-py3.5.egg