Wednesday, 3 December 2014

Python to start

Good news.

Python 2 and python 3 are not compatible. Therefore it is better to start with python 3. Under Ubuntu I start python by python3 and then I get into the interactive mode. Not useful at all.

How to start coding? I need an IDE. To install one for python3, apt-get install idle-python3.4 and it installs.

The first line of the code starts with
#!/path python

Should I start?

Django where to start

Ubuntu 14.04 has python 2.7 and python 3.4 installed.

To install Django with python3, we need pip3. Use command

sudo apt-get install python3-pip

Then install django

pip3 install django

Still a bit confused. Will try it later.





Wednesday, 22 October 2014

Get MD5 hash of a string

echo -n string | md5sum

MySQL database backup and restore

Backup commandline

mysqldump -u root -p dbtobackup >dbtobackup.sql

Restore commandline

  • Log into mysql
  • Create database
  • Use database
  • Source dbtorestore.sql

Wednesday, 8 October 2014

Restart the posts again. Hopefully I can keep on doing it.