pipenv install coverage --dev
coverage run --source='.' manage.py test
coverage html
Redis is an in-memory remote database that offers high performance, replication, and a unique data model to produce a platform for solving problems.
Redis is a very fast non-relational database that stores a mapping of keys to five different types of values.
Redis supports 5 types of data structure:
contains: Strings, integers, or floating-point values
server {
listen 80;
server_name ip_or_domain_name;
client_max_body_size 256m;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
alias /path/to/staticfiles/dir;
}
pyenv is similar to nvm in the Nodejs community. It allows to install, manage, and switch between multiple Python versions.
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
And add these three lines to .bash_profile or .bashrc.
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
/etc/passwd This is a very important file on your system! It's used to keep track of all users on the system. Run cat /etc/passwd and look at the output; each line is organized in this format:
username:password:UID:GID:UID info:home directory:command/shell
Let’s run through what each of those mean:
username: the user’s login name password: the password, will simply be an x if it’s encrypted user ID (UID): the user’s ID number in the system. 0 is root, 1-99 are for predefined users, and 100-999 are for other system accounts
Use Ubuntu umake Like this:
sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
sudo apt update
sudo apt install ubuntu-make
| """ | |
| This module provides a simple WSGI profiler middleware for finding | |
| bottlenecks in web application. It uses the profile or cProfile | |
| module to do the profiling and writes the stats to the stream provided | |
| To use, run `flask_profiler.py` instead of `app.py` | |
| see: http://werkzeug.pocoo.org/docs/0.9/contrib/profiler/ | |
| and: http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xvi-debugging-testing-and-profiling | |
| """ |
MTR(Matt's TraceRoute) MTR combines the functions of both the standard programs ping and traceroute. Like ping, it sends ICMP requests to a destination, either a domain name or an IP address, and listens for the destination to answer back. Like Traceroute, it also works by setting the Time To Live (TTL), or the number of maximum hops a packet can take over the network, to a low number, increasing with each attempt. This determines the route packets are taking to a destination along the way. The information will update continuously for as long as MTR runs. source
sudo apt-get install mtr