Open file /etc/default/locale to add or change LC_ALL to the following
LC_ALL="en_US.UTF-8"
Then logout and login again.
Install necessary packages
http { | |
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:8m max_size=3000m inactive=600m; | |
proxy_temp_path /var/tmp; | |
include mime.types; | |
default_type application/octet-stream; | |
sendfile on; | |
keepalive_timeout 65; | |
gzip on; | |
gzip_comp_level 6; |
import os | |
import barrel | |
REALM = "PRIVATE" | |
USERS = [('jacob', 'hunter2')] | |
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings") | |
from django.core.wsgi import get_wsgi_application | |
application = barrel.cooper.basicauth(users=USERS, realm=REALM)(get_wsgi_application()) |
#################################### | |
# BASIC REQUIREMENTS | |
# http://graphite.wikidot.com/installation | |
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/ | |
# Last tested & updated 10/13/2011 | |
#################################### | |
cd | |
sudo apt-get update | |
sudo apt-get upgrade |
############################################################################### | |
# The MIT License | |
# | |
# Copyright 2012-2014 Jakub Jirutka <[email protected]>. | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
server { | |
listen 8080 default_server deferred; | |
charset utf-8; | |
access_log /var/log/nginx/graphite.access.log; | |
error_log /var/log/nginx/graphite.error.log; | |
root /opt/graphite/webapp; | |
location /static/admin/ { |
% networked ping | |
% -- | |
% Open firewall ports 4369 (erlang port mapper) and 9100-9105 (communication ports) | |
% | |
% On node 1 start your shell with this command: | |
% erl -name [email protected] -setcookie cook -kernel inet_dist_listen_min 9100 inet_dist_listen_max 9105 | |
% | |
% On node 2 start your shell with this command: | |
% erl -name [email protected] -setcookie cook -kernel inet_dist_listen_min 9100 inet_dist_listen_max 9105 | |
% |
# This code is under the MIT license. | |
# Inspired by this StackOverflow question: | |
http://stackoverflow.com/questions/3295405/creating-django-objects-with-a-random-primary-key | |
import struct | |
from Crypto.Cipher import DES | |
from django.db import models | |
def base36encode(number): | |
"""Encode number to string of alphanumeric characters (0 to z). (Code taken from Wikipedia).""" |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)