Steps with explanations to set up a server using:
- virtualenv
- Django
- nginx
- uwsgi
| [user] | |
| name = Pavan Kumar Sunkara | |
| email = pavan.sss1991@gmail.com | |
| [core] | |
| editor = vim | |
| whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
| excludesfile = ~/.gitignore | |
| [sendemail] | |
| smtpencryption = tls | |
| smtpserver = smtp.gmail.com |
| <VirtualHost *:80> | |
| ServerAdmin webmaster@vac.io | |
| ServerName mejorandola.vac.io | |
| ProxyRequests Off | |
| ProxyVia Off | |
| ProxyErrorOverride Off | |
| ProxyPreserveHost On | |
| <Proxy *> | |
| Order deny, allow |
| #!/usr/bin/env python | |
| """ | |
| MSN ApplicationId patcher for pidgin/bitlbee/whatever | |
| (because you're too lazy to rebuild the whole thing.) | |
| Usage examples: | |
| python patch.py /usr/sbin/bitlbee | |
| python patch.py /usr/lib/purple-2/libmsn.so |
| function uf_getLastDir($sUrl) | |
| { | |
| $sPath = parse_url($sUrl, PHP_URL_PATH); // parse URL and return only path component | |
| $aPath = explode('/', trim($sPath, '/')); // remove surrounding "/" and return parts into array | |
| end($aPath); // last element of array | |
| if (is_dir($sPath)) // if path points to dir | |
| return current($aPath); // return last element of array | |
| if (is_file($sPath)) // if path points to file | |
| return prev($aPath); // return second to last element of array | |
| return false; // or return false |
| from django.db import models | |
| class MyModel(models.Model): | |
| myimage = models.ImageField( | |
| verbose_name = 'Imagen', | |
| upload_to='mis_imagenes' | |
| ) | |
| .... otros campos del modelo |
| # Create sudo user | |
| adduser <user> | |
| usermod -a -G sudo <user> | |
| logout | |
| # Update and clean | |
| sudo apt-get update | |
| sudo apt-get upgrade | |
| sudo apt-get dist-upgrade | |
| sudo apt-get autoremove |
| Esta son aplicaciones de django muy utiles, para como dice la filosofia de Instagram no reinventar la rueda :). | |
| django-mingus | |
| django-ratings | |
| django-ajax-validation | |
| django-google-analytics |