If you need a good way to secure your Django admin site (e.g., http://example.com/admin/), this is it.
Reference: https://gist.github.com/mtigas/952344
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
If you need a good way to secure your Django admin site (e.g., http://example.com/admin/), this is it.
Reference: https://gist.github.com/mtigas/952344
| # | |
| # This config file is a combination of ideas from: | |
| # http://www.37signals.com/svn/posts/1073-nuts-bolts-haproxy | |
| # http://www.igvita.com/2008/05/13/load-balancing-qos-with-haproxy/ | |
| # http://wiki.railsmachine.com/HAProxy | |
| # http://elwoodicious.com/2008/07/15/nginx-haproxy-thin-fastcgi-php5-load-balanced-rails-with-php-support/ | |
| # http://upstream-berlin.com/2008/01/09/using-haproxy-with-multiple-backends-aka-content-switching/ | |
| # http://wiki.railsmachine.com/HAProxy | |
| # http://gist.github.com/raw/25482/d39fb332edf977602c183194a1cf5e9a0b5264f9 | |
| # |
| jerry@pi:/tmp/redis-2.4.15$ make -j 2 | |
| cd src && make all | |
| make[1]: Entering directory `/tmp/redis-2.4.15/src' | |
| MAKE hiredis | |
| MAKE jemalloc | |
| make[2]: Entering directory `/tmp/redis-2.4.15/deps/hiredis' | |
| cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c | |
| checking for xsltproc... no | |
| checking for gcc... gcc | |
| checking whether the C compiler works... yes |
| # Some good references are: | |
| # http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x | |
| # http://www.paolocorti.net/2008/01/30/installing-postgis-on-ubuntu/ | |
| # http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630392 | |
| #1. Install PostgreSQL postgis and postgres | |
| brew install postgis | |
| initdb /usr/local/var/postgres | |
| pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start |
| # this will install everything as root, so take that into account before you run it | |
| # need cmake, python development headers, ZLib and OpenSSL | |
| sudo apt-get install cmake python2.7-dev zlib1g-dev libssl-dev | |
| mkdir libgit && cd libgit | |
| git clone git://github.com/libgit2/libgit2.git | |
| cd libgit2 |
Prereq:
apt-get install zsh
apt-get install git-coreGetting zsh to work in ubuntu is weird, since sh does not understand the source command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
| <?php | |
| /* PHP PBKDF2 implementation | |
| * | |
| * PBKDF2 is a key derivation function defined in RFC2898. It's used to | |
| * generate longer and more secure passwords from short, human-entered | |
| * passwords. The number of rounds can be increased to keep ahead of | |
| * improvements in CPU/GPU performance. | |
| * | |
| * You should use a different salt for each password (it's safe to store it |