poetry new <project-name>poetry add <library>For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
| # A guide to prevent pain and suffering while upgrading to OS X Mavericks | |
| # This will vary greatly depending on system set up, so read the instructions carefully | |
| # Back up Virtulenvs | |
| #################### | |
| # Very important! | |
| # For each virtualenv you have, run "pip freeze > requirements.txt" while in the activated virtualenv | |
| # in order to prevent loss of dependencies during the upgrade. |
You should have some tools installed like Homebrew, a text editor such as Sublime Text and it's subl command line app inside a bin folder and some basic terminal knowledge.
This gist is a more detailed version of niepi's gist with things that worked for me. It may help someone :)
$ brew install php --with-apache --with-mysql --with-pgsql --with-intl
| #!/bin/bash | |
| # git-cleanup-repo | |
| # | |
| # Author: Rob Miller <rob@bigfish.co.uk> | |
| # Adapted from the original by Yorick Sijsling | |
| git checkout master &> /dev/null | |
| # Make sure we're working with the most up-to-date version of master. | |
| git fetch |
| /** | |
| * Get YouTube ID from various YouTube URL | |
| * @author: takien | |
| * @url: http://takien.com | |
| * For PHP YouTube parser, go here http://takien.com/864 | |
| */ | |
| function YouTubeGetID(url){ | |
| var ID = ''; | |
| url = url.replace(/(>|<)/gi,'').split(/(vi\/|v=|\/v\/|youtu\.be\/|\/embed\/)/); |
| # -*- coding: utf-8 -*- | |
| from django.views.generic import ListView | |
| class SortableListView(ListView): | |
| allowed_sort_fields = () | |
| sort_default = None | |
| sort_key = 'sort' | |
| sort_field_splitter = '-' | |
| sort_ascending_postfix = 'up' | |
| sort_descending_postfix = 'down' |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| #-*- coding: utf-8 -*- | |
| import urlparse | |
| from django.contrib.auth import REDIRECT_FIELD_NAME, login | |
| from django.contrib.auth.forms import AuthenticationForm | |
| from django.http import HttpResponseRedirect | |
| from django.utils.decorators import method_decorator | |
| from django.views.decorators.cache import never_cache | |
| from django.views.decorators.csrf import csrf_protect | |
| from django.views.generic.edit import FormView | |
| from django.conf import settings |