forked from reddit-archive/reddit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4778b17
Showing
391 changed files
with
44,864 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
*.pyc | ||
*.pyo | ||
*~ | ||
*.html.py | ||
*.so | ||
*.o | ||
*.orig | ||
*.tmp | ||
*.md5 | ||
*.*.py | ||
.\#* | ||
\#*.*\# | ||
.hg | ||
.hgignore | ||
development.ini | ||
production.ini | ||
r2/r2/public/static/frame.js | ||
r2/r2/public/static/reddit.js | ||
r2/r2/public/static/vote.js | ||
r2/r2/public/static/reddit_rtl.css | ||
r2/data/* | ||
r2/count.pickle | ||
r2/myproduction.ini | ||
.DS_Store | ||
r2/r2.egg-info/** |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
## "The contents of this file are subject to the Common Public Attribution | ||
## License Version 1.0. (the "License"); you may not use this file except in | ||
## compliance with the License. You may obtain a copy of the License at | ||
## http://code.reddit.com/LICENSE. The License is based on the Mozilla Public | ||
## License Version 1.1, but Sections 14 and 15 have been added to cover use of | ||
## software over a computer network and provide for limited attribution for the | ||
## Original Developer. In addition, Exhibit A has been modified to be consistent | ||
## with Exhibit B. | ||
## | ||
## Software distributed under the License is distributed on an "AS IS" basis, | ||
## WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for | ||
## the specific language governing rights and limitations under the License. | ||
## | ||
## The Original Code is Reddit. | ||
## | ||
## The Original Developer is the Initial Developer. The Initial Developer of | ||
## the Original Code is CondeNet, Inc. | ||
## | ||
## All portions of the code written by CondeNet are Copyright (c) 2006-2008 | ||
## CondeNet, Inc. All Rights Reserved. | ||
################################################################################ | ||
|
||
# Extraction from Mako templates | ||
|
||
[mako:**.html] | ||
input_encoding = utf-8 | ||
[mako:**.xml] | ||
input_encoding = utf-8 | ||
[mako:**.htmllite] | ||
input_encoding = utf-8 | ||
|
||
# Extraction from Python source files | ||
|
||
[python:**.py] | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
|
||
cd /home/ri/hgreddit/r2 | ||
/usr/bin/paster run local.ini supervise_watcher.py -c "Alert(restart_list=['MEM'])" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#!/bin/bash | ||
|
||
# "The contents of this file are subject to the Common Public Attribution | ||
# License Version 1.0. (the "License"); you may not use this file except in | ||
# compliance with the License. You may obtain a copy of the License at | ||
# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public | ||
# License Version 1.1, but Sections 14 and 15 have been added to cover use of | ||
# software over a computer network and provide for limited attribution for the | ||
# Original Developer. In addition, Exhibit A has been modified to be consistent | ||
# with Exhibit B. | ||
# | ||
# Software distributed under the License is distributed on an "AS IS" basis, | ||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for | ||
# the specific language governing rights and limitations under the License. | ||
# | ||
# The Original Code is Reddit. | ||
# | ||
# The Original Developer is the Initial Developer. The Initial Developer of the | ||
# Original Code is CondeNet, Inc. | ||
# | ||
# All portions of the code written by CondeNet are Copyright (c) 2006-2008 | ||
# CondeNet, Inc. All Rights Reserved. | ||
################################################################################ | ||
|
||
files=( psrs.js utils.js animate.js link.js comments.js subreddit.js vote_piece.js reddit_piece.js organic.js ) | ||
|
||
wd=`pwd` | ||
redditjs='reddit.js' | ||
framejs='frame.js' | ||
votejs='vote.js' | ||
compressor=" $wd/r2/lib/contrib/jsjam -g -i" | ||
|
||
|
||
echo "generating rtl style sheet" | ||
|
||
./rtl.sh | ||
|
||
|
||
echo "Generating reddit.js..." | ||
|
||
cd r2/public/static | ||
[ -e $redditjs ] && rm $redditjs | ||
[ -e $redditjs-big ] && rm $redditjs-big | ||
|
||
cat json.js > $redditjs.tmp | ||
for f in "${files[@]}" | ||
do | ||
$compressor $f >> $redditjs.tmp | ||
done; | ||
sed 's/\$/ \$/g' $redditjs.tmp > $redditjs | ||
|
||
|
||
echo "Generating vote.js..." | ||
# compress the votes alone (for buttons) | ||
cat psrs.js | $compressor | sed 's/\$/ \$/g' > $votejs | ||
cat utils.js vote_piece.js | $compressor >> $votejs | ||
|
||
echo "Generating frame.js..." | ||
# compress frame alone (for the toolbar) | ||
cat psrs.js > $framejs | ||
cat vote_piece.js utils.js frame_piece.js | $compressor >> $framejs | ||
|
||
echo "droppping md5s..." | ||
for file in *.js | ||
do | ||
cat $file | openssl md5 > $file.md5 | ||
done | ||
for file in *.css | ||
do | ||
cat $file | openssl md5 > $file.md5 | ||
done |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# | ||
# r2 - Pylons development environment configuration | ||
# | ||
# The %(here)s variable will be replaced with the parent directory of this file | ||
# | ||
[DEFAULT] | ||
debug = true | ||
template_debug = true | ||
uncompressedJS = true | ||
translator = true | ||
|
||
proxy_addr = | ||
log_path = | ||
|
||
memcaches = 127.0.0.1:11211 | ||
rec_cache = 127.0.0.1:11311 | ||
tracker_url = | ||
|
||
main_db_name = reddit | ||
main_db_host = 127.0.0.1 | ||
main_db_user = reddit | ||
main_db_pass = password | ||
|
||
comment_db_name = reddit | ||
comment_db_host = 127.0.0.1 | ||
comment_db_user = reddit | ||
comment_db_pass = password | ||
|
||
vote_db_name = reddit | ||
vote_db_host = 127.0.0.1 | ||
vote_db_user = reddit | ||
vote_db_pass = password | ||
|
||
change_db_name = changes | ||
change_db_host = 127.0.0.1 | ||
change_db_user = reddit | ||
change_db_pass = password | ||
|
||
### | ||
# Other magic settings | ||
### | ||
|
||
timezone = UTC | ||
monitored_servers = localhost | ||
|
||
stylesheet = reddit.css | ||
stylesheet_rtl = reddit_rtl.css | ||
|
||
login_cookie = reddit_session | ||
domain = localhost | ||
default_sr = localhost | ||
admins = | ||
page_cache_time = 30 | ||
static_path = /static/ | ||
|
||
solr_url = | ||
|
||
SECRET = abcdefghijklmnopqrstuvwxyz0123456789 | ||
MODSECRET = abcdefghijklmnopqrstuvwxyz0123456789 | ||
ip_hash = | ||
|
||
MIN_DOWN_LINK = 0 | ||
MIN_UP_KARMA = 0 | ||
MIN_DOWN_KARMA = 0 | ||
MIN_RATE_LIMIT_KARMA = 0 | ||
MIN_RATE_LIMIT_COMMENT_KARMA = 0 | ||
|
||
# time in days | ||
MODWINDOW = 2 | ||
HOT_PAGE_AGE = 1 | ||
|
||
# time of ratelimit purgatory (min) | ||
RATELIMIT = 10 | ||
|
||
num_comments = 200 | ||
max_comments = 500 | ||
num_side_reddits = 20 | ||
|
||
#user-agents to limit | ||
agents = | ||
|
||
feedback_email = abuse@localhost | ||
|
||
[server:main] | ||
use = egg:Paste#http | ||
host = 0.0.0.0 | ||
port = %(port)s | ||
|
||
[app:main] | ||
use = egg:r2 | ||
cache_dir = %(here)s/data | ||
beaker.session_key = r2 | ||
beaker.session_secret = somesecret | ||
#lang = en | ||
|
||
# WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* | ||
# Debug mode will enable the interactive debugging tool, allowing ANYONE to | ||
# execute malicious code after an exception is raised. | ||
#set debug = false | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
This directory exists so that Subversion-based projects can share a single | ||
copy of the ``ez_setup`` bootstrap module for ``setuptools``, and have it | ||
automatically updated in their projects when ``setuptools`` is updated. | ||
|
||
For your convenience, you may use the following svn:externals definition:: | ||
|
||
ez_setup svn://svn.eby-sarna.com/svnroot/ez_setup | ||
|
||
You can set this by executing this command in your project directory:: | ||
|
||
svn propedit svn:externals . | ||
|
||
And then adding the line shown above to the file that comes up for editing. | ||
Then, whenever you update your project, ``ez_setup`` will be updated as well. | ||
|
Oops, something went wrong.