This file contains 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
start on runlevel [23] | |
stop on runlevel 1 | |
stop on shutdown | |
respawn | |
script | |
cd /home/solr | |
java -jar start.jar | |
end script |
This file contains 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
CACHES = { | |
'default': { | |
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', | |
'LOCATION': '127.0.0.1:11211', | |
'KEY_PREFIX': 'barstar_', | |
} | |
} |
This file contains 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 start_replication(): | |
""" | |
Begin Postgresql standby | |
""" | |
# Stop pg on the slave machine. | |
with settings(host_string=env.db_slave): | |
run('service postgresql-9.0 stop') | |
# Create the backup on the master machine | |
with settings(host_string=env.db_master): |
This file contains 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
### Basic daemon config | |
ServerRoot "/etc/apache2" | |
PidFile ${APACHE_PID_FILE} | |
User ${APACHE_RUN_USER} | |
Group ${APACHE_RUN_GROUP} | |
ServerTokens ProductOnly | |
ServerAdmin webmaster@djangoproject.com | |
### Listen on localhost:8000 (behind the proxy) |
This file contains 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
/* | |
As of version 1.1.2, Propane will load and execute the contents of | |
~Library/Application Support/Propane/unsupported/caveatPatchor.js | |
immediately following the execution of its own enhancer.js file. | |
You can use this mechanism to add your own customizations to Campfire | |
in Propane. | |
Below you'll find two customization examples. |
This file contains 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 base64 | |
import httplib | |
import threading | |
import urllib | |
import tweepy | |
CONVORE_BOT_USERNAME = '' | |
CONVORE_BOT_PASSWORD = '' | |
CONVORE_TOPIC_ID = '7612' |
This file contains 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 tastypie.resources import ModelResource | |
from yourapp.api.cache import CustomCache | |
from yourapp.models import YourModel | |
class SampleResource(ModelResource): | |
class Meta: | |
queryset = YourModel.objects.all() | |
resource_name = 'sample' | |
This file contains 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
# 2010-10-01 | |
# | |
# Mac OS X 10.6.3 | |
# Homebrew 0.7 | |
# Xcode 3.2.4 | |
# Git 1.7.3.1 | |
# RVM 1.0.12 | |
# Ruby 1.9.2, 1.8.7 | |
# Rails 3.0.0 | |
# Passenger 3.0.0.pre4 |
This file contains 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
<!-- | |
A quick fix for my friend Chris Bowler. | |
http://chrisbowler.com/journal/alternate-css-files | |
--> | |
<link rel="stylesheet" media="screen" id="time_style" href="/-/css/day.css" /> | |
<script> |