Skip to content

Commit

Permalink
Initial commit: added source for iheartpy.com
Browse files Browse the repository at this point in the history
Description:
	- author: singh@diwank.name
	- commit-details:
		* Added source code for iheartpy.com
		* Still pretty rough around the edges! :D

Changelog:
	new file:   iheartpy.com/app.yaml
		- App Engine Config
	new file:   iheartpy.com/error/*
		- Error Handlers
	new file:   iheartpy.com/handlers/*
		- Primary Handlers
	new file:   iheartpy.com/handlers/aiml/*
		- pyAIML
	new file:   iheartpy.com/handlers/ply/*
		- py Lex + YACC
	new file:   iheartpy.com/handlers/rawAIML/*
		- Lesson files
	new file:   iheartpy.com/site/*
		- Frontend
	new file:   iheartpy.com/txt/*
		- txt files
  • Loading branch information
Diwank Singh Tomer committed Mar 14, 2012
0 parents commit e054daf
Show file tree
Hide file tree
Showing 92 changed files with 28,953 additions and 0 deletions.
132 changes: 132 additions & 0 deletions iheartpy.com/app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
#######################
## App Configuration ##
#######################

# basics
application: iheartpy
version: v1
runtime: python
api_version: 1

# for browser caching
default_expiration: "30d"

#######################

handlers:

# public endpoints

- url: /
script: handlers/main.py

- url: /resources
script: handlers/main.py

- url: /instructions
script: handlers/main.py

- url: /wth
script: handlers/main.py

- url: /badges
script: handlers/badges.py

- url: /download
script: handlers/zipme.py

# user endpoints

- url: /shell
script: handlers/shell.py
login: required
auth_fail_action: redirect

- url: /shell.do
script: handlers/shell.py
login: required
auth_fail_action: unauthorized

- url: /shell.delete
script: handlers/shell.py

# Google Hangouts

- url: /hangouts
script: handlers/shell.py

# Static files

- url: /(.+\.(txt|xml|html))
static_files: txt/\1
upload: txt/(.+\.(txt|xml|html))
expiration: "15d"

- url: /(.+\.(appcache))
static_files: appcache/\1
mime_type: text/cache-manifest
upload: appcache/(.+\.(appcache))
expiration: "15d"

- url: /(.+\.(gif|png|jpg|ico|jpeg))
static_files: site/images/\1
upload: site/images/(.+\.(gif|png|jpg|ico|jpeg))
expiration: "30d"

- url: /css
static_dir: site/css
expiration: "30d"

- url: /js
static_dir: site/js
expiration: "30d"

- url: /images
static_dir: site/images
expiration: "30d"

# The rest go to daddy

- url: /.*
script: handlers/main.py

#########################

builtins:
- datastore_admin: on
- appstats: on
- remote_api: on
- admin_redirect: on

#########################

error_handlers:
# Catch All
- file: error/error.html

# Over Quota
- error_code: over_quota
file: error/quota.html

# DOS Deny
- error_code: dos_api_denial
file: error/deny.html

# Server Timeout
- error_code: timeout
file: error/timeout.html

#########################

skip_files:
- ^(.*/)?app\.yaml
- ^(.*/)?app\.yml
- ^(.*/)?index\.yaml
- ^(.*/)?index\.yml
- ^(.*/)?#.*#
- ^(.*/)?.*~
- ^(.*/)?.*\.py[co]
- ^(.*/)?.*/RCS/.*
- ^(.*/)?\..*
- ^(.*/)?.*\.bak
- ^(.*/)?.*\.gitignore
106 changes: 106 additions & 0 deletions iheartpy.com/error/deny.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!-- Consider adding a manifest.appcache: h5bp.com/d/Offline -->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<link rel="dns-prefetch" href="https://www.google-analytics.com" />
<link rel="sitemap" type="application/xml" title="Sitemap" href="/sitemap.xml" />

<!--//Meta Info// -->
<meta name="description" content="IHeartPy - Your friendly next-door Python Instructor!">
<meta name="author" content="Diwank Singh Tomer - me [at] thediwank [dot] in">

<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

<meta name="viewport" content="width=device-width, initial-scale=1.0">


<!--//Title// -->
<title>I &hearts; Py - {{ title }}</title>

<!--//Stylesheets// -->
<link rel="stylesheet" media="screen" href="/css/style.css">


<!--//Misc// -->
<link rel="shortcut icon" href="/favicon.ico">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">


<!-- More ideas for your <head> here: h5bp.com/d/head-Tips -->

<!-- All JavaScript at the bottom, except this Modernizr build incl. Respond.js
Respond is a polyfill for min/max-width media queries. Modernizr enables HTML5 elements & feature detects;
for optimal performance, create your own custom Modernizr build: www.modernizr.com/download/ -->
<script src="js/libs/modernizr-2.0.6.min.js"></script>
</head>

<body>
<div id="container">
<!--//MastHead// -->
<header>
<div class="header">
<a href="/"><h1>I Heart Py!</h1></a>
<h2> &hearts; The lovable Python Interpreter. &hearts; </h2>


<blockquote>A little perspective, like a little humor, goes a long way. - <em> Allen Klein </em></blockquote>

<span id="notifications"> <a href=".">Report</a> </span>

</div>
</header>

<hr></hr>

<!--//Error// -->
<div id="main" role="main">
<div class="error">Ain't<br/>Allowed<br/>Here!</div>
</div>

<hr></hr>

<!--//Footer// -->
<footer>
<div class="footer">
<div class="links">
<span>
<a href="/shell"> Go to Shell! </a>
<a href="/resources"> Resources </a>
</span>

</div>


<span class="copyright"> Copyright-(2010-12) Creatorrr! Labs <a href="/license.txt"> [^] </a> </span>

</div>
</footer>

</div> <!--! end of #container -->

<!-- Change UA-XXXXX-X to be your site's ID -->
<script src='https://ssl.google-analytics.com/ga.js' type='text/javascript'>

<!--//Google Analytics// -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{{analytics_id}}']);
_gaq.push(['_setDomainName', '.appspot.com']);
_gaq.push(['_trackPageview']);
</script>

<!--//URL Fix// -->
<script>
var GOOG_FIXURL_LANG = (navigator.language || '').slice(0,2),
GOOG_FIXURL_SITE = location.host;
</script>
<script src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>

</body>
</html>
106 changes: 106 additions & 0 deletions iheartpy.com/error/error.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!-- Consider adding a manifest.appcache: h5bp.com/d/Offline -->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<link rel="dns-prefetch" href="https://www.google-analytics.com" />
<link rel="sitemap" type="application/xml" title="Sitemap" href="/sitemap.xml" />

<!--//Meta Info// -->
<meta name="description" content="IHeartPy - Your friendly next-door Python Instructor!">
<meta name="author" content="Diwank Singh Tomer - me [at] thediwank [dot] in">

<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

<meta name="viewport" content="width=device-width, initial-scale=1.0">


<!--//Title// -->
<title>I &hearts; Py - {{ title }}</title>

<!--//Stylesheets// -->
<link rel="stylesheet" media="screen" href="/css/style.css">


<!--//Misc// -->
<link rel="shortcut icon" href="/favicon.ico">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">


<!-- More ideas for your <head> here: h5bp.com/d/head-Tips -->

<!-- All JavaScript at the bottom, except this Modernizr build incl. Respond.js
Respond is a polyfill for min/max-width media queries. Modernizr enables HTML5 elements & feature detects;
for optimal performance, create your own custom Modernizr build: www.modernizr.com/download/ -->
<script src="js/libs/modernizr-2.0.6.min.js"></script>
</head>

<body>
<div id="container">
<!--//MastHead// -->
<header>
<div class="header">
<a href="/"><h1>I Heart Py!</h1></a>
<h2> &hearts; The lovable Python Interpreter. &hearts; </h2>


<blockquote>A little perspective, like a little humor, goes a long way. - <em> Allen Klein </em></blockquote>

<span id="notifications"> <a href=".">Report</a> </span>

</div>
</header>

<hr></hr>

<!--//Error// -->
<div id="main" role="main">
<div class="error">'Oh Shit'<br/>Moments<br/>Happen!</div>
</div>

<hr></hr>

<!--//Footer// -->
<footer>
<div class="footer">
<div class="links">
<span>
<a href="/shell"> Go to Shell! </a>
<a href="/resources"> Resources </a>
</span>

</div>


<span class="copyright"> Copyright-(2010-12) Creatorrr! Labs <a href="/license.txt"> [^] </a> </span>

</div>
</footer>

</div> <!--! end of #container -->

<!-- Change UA-XXXXX-X to be your site's ID -->
<script src='https://ssl.google-analytics.com/ga.js' type='text/javascript'>

<!--//Google Analytics// -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{{analytics_id}}']);
_gaq.push(['_setDomainName', '.appspot.com']);
_gaq.push(['_trackPageview']);
</script>

<!--//URL Fix// -->
<script>
var GOOG_FIXURL_LANG = (navigator.language || '').slice(0,2),
GOOG_FIXURL_SITE = location.host;
</script>
<script src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>

</body>
</html>
Loading

0 comments on commit e054daf

Please sign in to comment.