@@ -0,0 +1 @@
{"name":"Stumpy","body":"# STUMPy\r\n\r\n_Mutaku URL Shortener_\r\n\r\n\r\n### WHAT IS STUMPY?\r\n\r\nSTUMPy is a URL shortener written by xiao_haozi (Mutaku) using the django python web framework.\r\n\r\n\r\n### WHY STUMPY?\r\n\r\nThere are many url shorteners out there, and STUMPy does not do anything groundbreaking.\r\nHowever, there are several benefits that encouraged it's development:\r\n\r\n* you keep all the data and can access it at your will\r\n* you keep all the code and can access/change it at your will\r\n* simple to use, simple to run, and simple code\r\n* because of it's simplicity, it is easy to understand how url shorteners work and some of the possible optimizations\r\n* uses the django framework which allows for easy expansion, management, and tweaking\r\n* django also allows for a nice web UI for administration of all of the data\r\n\r\n\r\n### REQUIREMENTS:\r\n\r\n{requirement [link for source]}\r\n\r\n* \"Python\":http://www.python.org/getit/\r\n* \"Django\":http://docs.djangoproject.com/en/1.3/intro/install/\r\n* \"HTML5lib\":http://code.google.com/p/html5lib/\r\n* \"Bleach\":https://github.com/jsocol/bleach\r\n\r\n\r\n### INSTALLATION, SETUP, AND TESTING:\r\n\r\nSee: \"Django Install\":http://docs.djangoproject.com/en/1.3/intro/install/\r\nOnce you have django installed and running, you can checkout the repo and test things out in a few steps.\r\n\r\n►Grab the latest release with git.\r\n\r\n`git clone https://mutaku@github.com/mutaku/Stumpy.git`\r\n\r\n►Setup a mysql database that stumpy can access.\r\n\r\n```\r\ncreate database stumpy;\r\ngrant all on stumpy.* to 'SOMEUSER@localhost' identified by \"SOMEPASS\";\r\nflush privilieges;\r\n```\r\n\r\n►Copy the local_settings.py.dist file to local_settings.py .\r\n\r\n`cp local_settings.py.dist local_settings.py`\r\n\r\n►If you do not have a SECRET_KEY generated in Django you will need to generate one by running the keygen script and copy that key into your local_settings.py file in the next step.\r\n\r\n`python gimme_key.py`\r\n\r\n►Edit the local_settings.py file and add in your appropriate database variables and your secret key you already had from django or the one you generated above.\r\n\r\n►Sync the database to the models.\r\n\r\n`python manage.py syncdb`\r\n\r\n►Fire up the server and navigate to /admin in your browser. Go to sites->sites and edit the domain name to match the domain you are using. This will initially be set to 'example.com'.\r\n\r\n`python manage.py runserver`\r\n\r\n### PRODUCTION RUNNING:\r\n\r\nSee: \"Deploying Django\":http://docs.djangoproject.com/en/1.3/howto/deployment/\r\nOnce you have your webserver setup to serve the static files, you can set DEBUG=False. Without doing so, static files will not be served up by Django in production mode (DEBUG=False).\r\nAdditionally, ensure that you have set your proper FQDN through the admin interface as mentioned in the last step of the setup section.\r\n\r\nI have included an example fastcgi script (stumpy.fcgi) that you may point to with your webserver to run Stumpy in a production setting.\r\nThe following is an example of a stanza that you could use with Lighttpd to serve up Stumpy.\r\n\r\n```\r\n$HTTP[\"host\"] =~ \"example.com\" {\r\n server.document-root = \"/home/JohnDoe/Stumpy/\"\r\n fastcgi.server = ( \".fcgi\" =>\r\n ( \"localhost\" => (\r\n \"socket\" => \"/var/lib/lighttpd/stumpy-fastcgi.socket\",\r\n \"bin-path\" => \"/home/JohnDoe/Stumpy/stumpy.fcgi\",\r\n \"check-local\" => \"disable\",\r\n \"min-procs\" => 2,\r\n \"max-procs\" => 4,\r\n )\r\n ),\r\n )\r\n alias.url = ( \"/static/admin\" => \"/home/JohnDoe/django/contrib/admin/media/\" )\r\n url.rewrite-once = ( \"^(/static/.*)$\" => \"$1\",\r\n \"^/favicon\\.ico$\" => \"/static/favicon.ico\",\r\n \"^(/.*)$\" => \"/stumpy.fcgi$1\" )\r\n}\r\n```\r\n\r\n### USAGE:\r\n\r\nYou will probably be able to see from the urls.py how to go about using Stumpy. Here's the rundown:\r\n\r\n* [site]/ \t\t->\tindex view (recent stumps, popular stumps, and the bookmarklet)\r\n\r\n* [site]/[shorturl] \t->\tgrab shorturl and redirect\r\n\r\n* [site]/register\t\t->\tregister new user [for users - admin can add through admin interface]\r\n\r\n* [site]/admin \t\t*->\tadmin interface \r\n\r\n* [site]/url/?l=[longurl] \t*->\tshorten url [this is how the bookmarklet does it] [needs to be escaped if not using bookmarklet]\r\n\r\n*-> These views require authenticated_user and uses sessions\r\n\r\n\r\n### NOTES:\r\n\r\nA bookmarklet is ready to use and can be found by visiting the index page (\"/\") and dragging the 'stumpy it!' link to your bookmarks bar.\r\n\r\nTo add additional users that may submit URLs, add the user via the admin interface. They do not need to have any admin interface abilities to simply login and and submit URLs.\r\nIf you want a user to have permission to edit and delete urls (why?) you would have to enable those permissions in the user management in the admin interface.\r\n\r\n\r\n### FAQ:\r\n\r\n[coming soon]\r\n\r\n\r\n### HELP:\r\n\r\nMost of the information you might need can be found in the Django docs here: \"Django\":http://www.djangoproject.com/\r\nFor Stumpy specific help, see \"Stumpy\":https://github.com/mutaku/Stumpy","tagline":"URL Shortener in Django","google":"<script type=\"text/javascript\"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-30545177-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script>","note":"Don't delete this file! It's used internally to help with page regeneration."}
@@ -0,0 +1,3 @@
@import url("screen.css");
@import url("non-screen.css") handheld;
@import url("non-screen.css") only screen and (max-device-width:640px);

Large diffs are not rendered by default.

@@ -0,0 +1,154 @@
a#forkme_banner {
display: none;
}

div.shell {
width: 640px;
}


header {
max-width:640px;
margin: 0;
top: 51px;
}

header span.ribbon-inner {
border: 8px solid #7c334f;
padding: 6px;
}

header span.left-tail, header span.right-tail {
width: 19px;
height: 10px;
background: transparent url(../images/ribbon-tail-sprite-2x.png) 0 0 no-repeat;
bottom: -10px;
}

header span.left-tail {
left: 0;
}

header span.right-tail {
background-position: -19px 0;
right: 0;
}

header h1 {
font-size: 2em;
}

section#downloads {
height: 171px;
width: 602px;
margin: 51px auto -250px;
background: transparent url(../images/shield.png) center 0 no-repeat;
}

section#downloads a {
display: none;
}

span.banner-fix {
background: transparent url(../images/shield-fallback.png) center top no-repeat;
height: 31px;
width: 640px;
top: 20px;
}

section#main_content {
padding: 20px 40px 0;
}

footer {
max-width:640px;
background: none;
}

footer span.left-tail, footer span.right-tail {
width: 23px;
height: 126px;
background: transparent url(../images/small-ribbon-tail-sprite-2x.png) 0 0 no-repeat;
top: -126px;
}

footer span.left-tail {
left: 0;
}

footer span.right-tail {
background-position: -23px 0;
right: 0;
}

footer p {
font-size: .6em;
}

footer span.ribbon-inner {
border: 8px solid #7c334f;
padding: 6px;
}

footer span.ribbon-inner p {
font-size: 22px;
height: auto;
line-height: 1.1;
padding: 20px 0px 10px;
}

footer span.ribbon-inner a {
font-size: 38px;
display: block;
bottom: 0;
padding-bottom: 10px;
}

footer span.octocat {
background: transparent url(../images/octocat-2x.png) 0 0 no-repeat;
width: 60px;
height: 60px;
margin: 20px auto 0;
}

body {
font: normal normal 30px/1.5 Georgia, Palatino,” Palatino Linotype”, Times, “Times New Roman”, serif;
}

ul li {
padding-left: 20px;
background: transparent url(../images/chevron-2x.png) left 15px no-repeat;
}

table {
border-bottom: 4px solid #bdb6ad;
}

th {
border-width: 0 4px 4px 0;
}

td {
border-width: 0 4px 4px 0;
}

pre {
border-bottom: 4px solid #bdb6ad;
}

img {
-webkit-box-shadow: 0px 4px 0px #bdb6ad;
-moz-box-shadow: 0px 4px 0px #bdb6ad;
box-shadow: 0px 4px 0px #bdb6ad;
border: 4px solid #fff6e9;
max-width: 556px;
}

blockquote {
background: transparent url('../images/blockquote-gfx-2x.png') 0 8px no-repeat;
}

hr {
height: 42px;
background: transparent url('../images/hr-2x.jpg') center center repeat-x;
}
@@ -0,0 +1,34 @@
* {
background: none !important;
color: #333 !important;
}

h1,h2,h3,h4,h5,h6 {
color: #7c334f !important;
}

a {
color: #417090 !important;
}

#main_content > .header-level-1:first-child,
#main_content > .header-level-2:first-child,
#main_content > .header-level-3:first-child,
#main_content > .header-level-4:first-child,
#main_content > .header-level-5:first-child,
#main_content > .header-level-6:first-child {
margin-top: 10px !important;
}

#forkme_banner,
#downloads,
.left-tail,
.right-tail
{
display: none !important;

}

.ribbon-inner,.ribbon-outer {
border: 0 !important;
}
@@ -0,0 +1,69 @@
.highlight { background: #ffffff; }
.highlight .c { color: #999988; font-style: italic } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { font-weight: bold } /* Keyword */
.highlight .o { font-weight: bold } /* Operator */
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #999999 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold; } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { font-weight: bold } /* Keyword.Constant */
.highlight .kd { font-weight: bold } /* Keyword.Declaration */
.highlight .kn { font-weight: bold } /* Keyword.Namespace */
.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
.highlight .kr { font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #009999 } /* Literal.Number */
.highlight .s { color: #d14 } /* Literal.String */
.highlight .na { color: #008080 } /* Name.Attribute */
.highlight .nb { color: #0086B3 } /* Name.Builtin */
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
.highlight .no { color: #008080 } /* Name.Constant */
.highlight .ni { color: #800080 } /* Name.Entity */
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
.highlight .nn { color: #555555 } /* Name.Namespace */
.highlight .nt { color: #000080 } /* Name.Tag */
.highlight .nv { color: #008080 } /* Name.Variable */
.highlight .ow { font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mf { color: #009999 } /* Literal.Number.Float */
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
.highlight .sb { color: #d14 } /* Literal.String.Backtick */
.highlight .sc { color: #d14 } /* Literal.String.Char */
.highlight .sd { color: #d14 } /* Literal.String.Doc */
.highlight .s2 { color: #d14 } /* Literal.String.Double */
.highlight .se { color: #d14 } /* Literal.String.Escape */
.highlight .sh { color: #d14 } /* Literal.String.Heredoc */
.highlight .si { color: #d14 } /* Literal.String.Interpol */
.highlight .sx { color: #d14 } /* Literal.String.Other */
.highlight .sr { color: #009926 } /* Literal.String.Regex */
.highlight .s1 { color: #d14 } /* Literal.String.Single */
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #008080 } /* Name.Variable.Class */
.highlight .vg { color: #008080 } /* Name.Variable.Global */
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */

.type-csharp .highlight .k { color: #0000FF }
.type-csharp .highlight .kt { color: #0000FF }
.type-csharp .highlight .nf { color: #000000; font-weight: normal }
.type-csharp .highlight .nc { color: #2B91AF }
.type-csharp .highlight .nn { color: #000000 }
.type-csharp .highlight .s { color: #A31515 }
.type-csharp .highlight .sc { color: #A31515 }

Large diffs are not rendered by default.