Ctrl+D
or
process.exit()
process.exit()
node -v
<uses-sdk android:minSdkVersion="4" />Xcode --> Open Developer Tool --> Command Line Tools for Xcode.dmgwhich gcc you should see /usr/bin/gcc, and which g++ you should see /usr/bin/g++#include <unordered_map>#include <tr1/unordered_map>
cd /usr/local/lib, mkdir django-1.3.1 and cd into itwget http://www.djangoproject.com/download/1.3.1/tarball/ -O Django-1.3.1.tar.gz, got this step from herecd Django-1.3.1.tar.gzsudo python setup.py install/usr/local/lib/django-1.3.1/Django-1.3.1
mkvirtualenv --no-site-packages vocab this is virtualenvwrapper setting up a new environment. Setup is logged in this old post.$ mkvirtualenv --no-site-packages vocab
New python executable in vocab/bin/python
Installing setuptools............done.
Installing pip...............done.
virtualenvwrapper.user_scripts creating /home/my_username/.virtualenvs/vocab/bin/predeactivate
virtualenvwrapper.user_scripts creating /home/my_username/.virtualenvs/vocab/bin/postdeactivate
virtualenvwrapper.user_scripts creating /home/my_username/.virtualenvs/vocab/bin/preactivate
virtualenvwrapper.user_scripts creating /home/my_username/.virtualenvs/vocab/bin/postactivate
virtualenvwrapper.user_scripts creating /home/my_username/.virtualenvs/vocab/bin/get_env_details
mkdir: cannot create directory `/home/my_username/Projects/vocab': No such file or directory
-bash: cd: /home/my_username/Projects/vocab: No such file or directory
Searching for readline
Reading http://pypi.python.org/simple/readline/
Reading http://www.python.org/
Reading http://github.com/ludwigschwardt/python-readline
Best match: readline 6.2.1
Downloading http://pypi.python.org/packages/source/r/readline/readline-6.2.1.tar.gz#md5=9604527863378512247fcaf938100797
Processing readline-6.2.1.tar.gz
Running readline-6.2.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-9h67Mv/readline-6.2.1/egg-dist-tmp-nNoSrj
/usr/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status
error: Setup script exited with error: command 'gcc' failed with exit status 1
Downloading/unpacking Jinja2==2.3.1
Downloading Jinja2-2.3.1.tar.gz (428Kb): 428Kb downloaded
Running setup.py egg_info for package Jinja2
warning: no previously-included files matching '*' found under directory 'docs/_build/doctrees'
Downloading/unpacking MySQL-python==1.2.3c1
Downloading MySQL-python-1.2.3c1.tar.gz (89Kb): 89Kb downloaded
Running setup.py egg_info for package MySQL-python
Downloading/unpacking lxml==2.2.6
Downloading lxml-2.2.6.tar.gz (2.9Mb): 2.9Mb downloaded
Running setup.py egg_info for package lxml
Building lxml version 2.2.6.
NOTE: Trying to build without Cython, pre-generated 'src/lxml/lxml.etree.c' needs to be available.
ERROR: /bin/sh: xslt-config: not found
** make sure the development packages of libxml2 and libxslt are installed **
Using build configuration of libxslt
warning: no previously-included files found matching '*.py'
Downloading/unpacking PIL
Downloading PIL-1.1.7.tar.gz (506Kb): 506Kb downloaded
Running setup.py egg_info for package PIL
WARNING: '' not a valid package name; please use only.-separated package names in setup.py
Obtaining check from git+git://github.com/jbalogh/check.git#egg=check
Cloning git://github.com/jbalogh/check.git to /home/my_username/.virtualenvs/vocab/src/check
Running setup.py egg_info for package check
Downloading/unpacking pyflakes (from check)
Downloading pyflakes-0.5.0.tar.gz
Running setup.py egg_info for package pyflakes
Downloading/unpacking pep8 (from check)
Downloading pep8-0.6.1.tar.gz
Running setup.py egg_info for package pep8
Downloading/unpacking path.py (from check)
Error while getting http://pypi.python.org/packages/source/p/path.py/path.py-2.2.2.tar.gz#md5=3a3262b9049d294ddbd6f7453d45e699 (from http://pypi.python.org/simple/path.py/)
Exception:
Traceback (most recent call last):
File "/home/my_username/.virtualenvs/vocab/local/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/basecommand.py", line 126, in main
self.run(options, args)
File "/home/my_username/.virtualenvs/vocab/local/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/commands/install.py", line 223, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/home/my_username/.virtualenvs/vocab/local/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/req.py", line 961, in prepare_files
self.unpack_url(url, location, self.is_download)
File "/home/my_username/.virtualenvs/vocab/local/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/req.py", line 1079, in unpack_url
return unpack_http_url(link, location, self.download_cache, only_download)
File "/home/my_username/.virtualenvs/vocab/local/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/download.py", line 429, in unpack_http_url
resp = _get_response_from_url(target_url, link)
File "/home/my_username/.virtualenvs/vocab/local/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/download.py", line 465, in _get_response_from_url
resp = urlopen(target_url)
File "/home/my_username/.virtualenvs/vocab/local/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/download.py", line 84, in __call__
response = urllib2.urlopen(self.get_request(url))
File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 391, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 409, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 369, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1185, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1160, in do_open
raise URLError(err)
URLError:
Storing complete log in /home/my_username/.pip/pip.log
add2virtualenv /usr/local/lib/django-1.3.1/Django-1.3.1python manage.py sql app_name I got this error:...
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb
so I didpip install MySQL-pythonmkdir apps; touch apps/__init__.pypython manage.py startapp app_namemv app_name appsvim settings.py and add into INSTALLED_APPS 'apps.apps_name'python manage.py sql app_nameError: No module named app_name
wc -l * wc -l * | sort -n -k1git log --graph --color
./manage.py shellpip install mysql-python. sudo apt-get install python-dev./manage.py shell haspip install pyopenssl./manage.py shell haspip install py-bcrypt$ ./manage.py shell Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) [GCC 4.5.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> import django
$ ./manage.py runserver 50.57.147.82:8000
Validating models...
0 errors found
Django version 1.3.1, using settings 'MozSecWorld.settings_local'
Development server is running at http://50.57.147.82:8000/
Quit the server with CONTROL-C.
[21/Oct/2011 03:23:36] "GET / HTTP/1.1" 301 0
Traceback (most recent call last):
...
TemplateSyntaxError: Caught ImportError while rendering: No module named jinja2
[21/Oct/2011 03:23:37] "GET /msw/ HTTP/1.1" 500 2909
So I did, from root, pip install jinja2sudo apt-get install python-setuptoolssudo easy_install virtualenvvirtualenv ve_msw
New python executable in ve_msw/bin/python
Installing setuptools............done.
Installing pip...............done.
easy_install pip (I could also have done "pip install virtualenv" or "easy_install virtualenvwrapper"pip install virtualenvwrappermkdir ~/.virtualenvsexport WORKON_HOME=$HOME/.virtualenvs source /usr/local/bin/virtualenvwrapper.sh
$ mkvirtualenv ve_msw
New python executable in ve_msw/bin/python
Installing setuptools............done.
Installing pip...............done.
virtualenvwrapper.user_scripts creating /home/haoqili/.virtualenvs/ve_msw/bin/predeactivate
virtualenvwrapper.user_scripts creating /home/haoqili/.virtualenvs/ve_msw/bin/postdeactivate
virtualenvwrapper.user_scripts creating /home/haoqili/.virtualenvs/ve_msw/bin/preactivate
virtualenvwrapper.user_scripts creating /home/haoqili/.virtualenvs/ve_msw/bin/postactivate
virtualenvwrapper.user_scripts creating /home/haoqili/.virtualenvs/ve_msw/bin/get_env_details
proj_name=$(echo $VIRTUAL_ENV|awk -F'/' '{print $NF}')
mkdir $HOME/Projects/$proj_name
add2virtualenv $HOME/Projects/$proj_name
cd $HOME/Projects/$proj_name
easy_install readline ipython
pip install -e git://github.com/jbalogh/check.git#egg=check Jinja2==2.3.1 \
MySQL-python==1.2.3c1 lxml==2.2.6 PIL
workon ve_mswcd ~/path/to/mswdir
CREATE USER 'new_username'@'localhost' IDENTIFIED BY 'password_for_new_username';
GRANT ALL ON *.* TO 'new_username'@'localhost';
adduser usernameuseradd username~/ failed, I had to sudo mkdir /home/alice.useradd -D shows the defaults of useradd. You can change the shell to bash by specifying useradd -D -s /bin/bash
. Then you can use useradd alice followed by passwd alice to set its password. BUT!! This still doesn't automatically make /home/alice for youadduser alice worked beautifully# adduser alice
Adding user `alice' ...
Adding new group `alice' (1001) ...
Adding new user `alice' (1001) with group `alice' ...
Creating home directory `/home/alice' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for alice
Enter the new value, or press ENTER for the default
Full Name []: Alice P Hacker
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] y
... Why does it care about the room number? haha
visudo but it takes me to the nano editor.export EDITOR="vim", which if you want to be your default editor, add this line to ~/.bashrc.root ALL=(ALL:ALL) ALL ~/.bash_historyps or echo $SHELLgrep username /etc/passwd/etc/passwd from /bin/sh to /bin/bash/etc/shells/etc/skel directory. "The /etc/skel directory contains files and directories that are automatically copied over to a new user's home directory when such user is created by the useradd program." ~ source
$git merge repo Auto-merging path/to/file1 Auto-merging path/to/file2 CONFLICT (content): Merge conflict in path/to/file3 Auto-merging path/to/file4 CONFLICT (content): Merge conflict in path/to/file5 Automatic merge failed; fix conflicts and then commit the result.
To fix:
For all files with conflicts, do:
1.vim path/to/file3 and then compare the text
<<<<<<< =======
with
====== >>>>>>>Make sure you delete those indicator lines too.
2. git update-index [path/to/file3]