This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# DONT FORGET TO RUN: | |
# a2ensite default-ssl | |
# dav_svn.conf - Example Subversion/Apache configuration | |
# | |
# For details and further options see the Apache user manual and | |
# the Subversion book. | |
# | |
# NOTE: for a setup with multiple vhosts, you will want to do this | |
# configuration in /etc/apache2/sites-available/*, not here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerAdmin webmaster@localhost | |
DocumentRoot /var/www | |
<Directory /> | |
Options FollowSymLinks | |
AllowOverride None | |
Order deny,allow | |
Deny from All | |
</Directory> |
Drobo Pros tend to die and reboot if the iscsi parameters are not right on the initiator (on the client).
As such, we need to make sure the following parameters are set in the iscsi (client) configuration file for the drobo node (change this in /etc/iscsi/iscsid.conf for it to be reboot-persistent):
node.session.cmds_max = 16 node.session.queue_depth = 16 node.conn[0].tcp.window_size = 65535
A more complete article is here: http://www.thirdmartini.com/index.php/DroboPro,_iSCSI_and_Linux
../../bin/django makemessages -l it -e html,xml,py,txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def show_toolbar(request): | |
return request.user.is_superuser and 'debug' in request.GET | |
DEBUG_TOOLBAR_CONFIG = { | |
'SHOW_TOOLBAR_CALLBACK': show_toolbar, | |
'MEDIA_URL': '/media/debug_toolbar/', | |
'INTERCEPT_REDIRECTS': False, | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import socket | |
class IP(object): | |
def __init__(self): | |
self.base = None | |
def get(self, end): | |
if not self.base: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This should be run on a relatvely modern version of Ubuntu (9.10 or later, | |
# without any sort of confidence) | |
PROJECT_NAME=$1 | |
if [ x$PROJECT_NAME = "x" ] ; then | |
# No project name! | |
echo "Usage: $0 <project name>" | |
exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.core.urlresolvers import get_resolver | |
from django.core.urlresolvers import RegexURLResolver, RegexURLPattern | |
def _recurse_resolver(resolver, prefix=[]): | |
patterns = [] | |
for obj in resolver.url_patterns: | |
if isinstance(obj, RegexURLPattern): | |
patterns.append(prefix + [obj.regex.pattern]) | |
elif isinstance(obj, RegexURLResolver): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ionelmc> single currency, mail shiping for start - however there's need for some various discounting schemes for products and some fancy category scheme i think | |
<ionelmc> so the Product.get_specific implementation is going to be replaced by djnago-polymorphic ? | |
<Tribaal> ionelmc, I'll keep the polymorphic branhc around, I think it's really elegan | |
<Tribaal> so I'll test more before I make a decision | |
<ionelmc> if i need to manage stock i have to build my own models for that right? | |
<Tribaal> but generally I thin kit's the right way to go, yeah | |
<Tribaal> ionelmc, yes, for the time being | |
<Tribaal> for stock I think there should be a new type of plugin almost (like a transaction plugin) | |
<Tribaal> it would be useful for vouchers too, for instance | |
<Tribaal> for the time being the stock needs to be handled in your own models, however |
OlderNewer