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
| TriObject *createTriangleMesh(const std::vector<Point3> &points, | |
| const std::vector<Point3> &normals, | |
| const std::vector<Point2> &uvs, | |
| const std::vector<int> &triangleVertIndices) | |
| { | |
| TriObject *triobj = CreateNewTriObject(); | |
| if (triobj == NULL) | |
| return NULL; | |
| assert(points.size() == normals.size() && normals.size() == uvs.size()); |
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
| location /phpmyadmin { | |
| root /usr/share/; | |
| index index.php index.html index.htm; | |
| location ~ ^/phpmyadmin/(.+\.php)$ { | |
| try_files $uri =404; | |
| root /usr/share/; | |
| fastcgi_pass unix:/var/run/php5-fpm.sock; | |
| fastcgi_index index.php; | |
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
| include /etc/nginx/fastcgi_params; |
| // Sublime Text | |
| { | |
| "color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme", | |
| "font_face": "DejaVu Sans Mono", | |
| "font_size": 10, | |
| "ignored_packages": | |
| [ | |
| "Vintage" | |
| ], | |
| "translate_tabs_to_spaces": true, |
| # ~/.ssh/config | |
| Host *.compute-1.amazonaws.com | |
| IdentityFile ~/.ssh/us-east-1.pem | |
| Host *.ap-northeast-1.compute.amazonaws.com | |
| IdentityFile ~/.ssh/ap-northeast-1.pem |
| sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" > /etc/apt/sources.list.d/pgdg.list' | |
| wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
| sudo apt-get update | |
| sudo apt-get upgrade | |
| # sudo apt-get install postgresql-9.3 | |
| # sudo apt-get install postgresql-client-9.3 |
| sudo apt-get install -y gcc python-dev libffi-dev libssl-dev libxml2-dev libxslt1-dev build-essential |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| SleekXMPP: The Sleek XMPP Library | |
| Copyright (C) 2010 Nathanael C. Fritz | |
| This file is part of SleekXMPP. | |
| See the file LICENSE for copying permission. | |
| """ |