All posts by uneuronh

software engineer , working as Tech Lead @ Y!

Django mysql configuration

DATABASES = {
‘default’: {
‘ENGINE’: ‘django.db.backends.mysql’,
‘NAME’: ‘DB_NAME’,
‘USER’: ‘DB_USER’,
‘PASSWORD’: ‘DB_PASSWORD’,
‘HOST’: ‘localhost’, # Or an IP Address that your DB is hosted on
‘PORT’: ‘3306’,
}
}

Advertisements

Mongo DB Tips

1. To Create New Database

use <dbname>

2. To add user to a databse

use <dbname>

db.addUser( { user: “<username>”,pwd: “<password>”,roles: [ <roles> ]} );

example: db.addUser( { user: “newdatabse”,pwd: “password”,roles: [ “readWrite”, “dbAdmin” ]} );

Assurance Tools for PHP

1. PHPUnit

2. Behat – framework allows you to write highly readable feature tests – tests that can be easily understood by even non-technical people

3. vfsStream – a stream wrapper for a virtual file system that may be helpful in unit tests to mock the real file system.

4. PHPLOC – measures the size of your project in lines of code, number of files, number of classes, and so on

5. PHP Mess Detector – looks for messy code: possible bugs, suboptimal code, overcomplicated methods, unused expressions and so on.

6. PHP CodeSniffer – sniffs through your code and detects violations in syntax

7. Dead code Detector

8. Copy Paste Detector