- jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
- Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
- AngularJS - Conventions based MVC framework for HTML5 apps.
- Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
- lawnchair - Key/value store adapter for indexdb, localStorage
- 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
- Compass - Open source CSS Authoring Framework.
- Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
- Font Awesome - The iconic font designed for Bootstrap.
- Zurb Foundation - Framework for writing responsive web sites.
- SASS - CSS extension language which allows variables, mixins and rules nesting.
- Skeleton - Boilerplate for responsive, mobile-friendly development.
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 flask import Flask | |
| from flask_script import Manager | |
| from flask_admin import Admin | |
| import os.path as op | |
| import os | |
| app = Flask(__name__) | |
| manager = Manager(app) | |
| admin = Admin(app) #<-- this gives our app some templates to gather |
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 flask import Flask | |
| from flask import render_template | |
| app = Flask(__name__) | |
| app.url_map.strict_slashes = False | |
| @app.route('/partials/<partial>') | |
| def partial(partial): | |
| return render_template(partial,jinja_var='this is from jinja') |
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
| print_tables =\ | |
| lambda\ | |
| BaseModel:\ | |
| ''.join( | |
| map( | |
| lambda x:\ | |
| '\n{}\n{}\n'.format( | |
| x[0], | |
| x[1].__table__.c.keys() | |
| ),filter( |
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
| {% for cat,msg in get_flashed_messages(with_categories=true) %} | |
| <div class="alert alert-dissmissable alert-{{ cat }}" id="alert-{{ loop.index }}"> | |
| <span id="close-alert-{{ loop.index }}" class=close>x</span> | |
| {{ msg }} | |
| </div> | |
| <script> | |
| var alert = document.getElementById('alert-{{ loop.index }}'), | |
| closeBtn = document.getElementById('close-alert-{{ loop.index }}'); | |
| closeBtn.onClick = function(){ | |
| alert.remove(); |
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
| #!/usr/bin/env python | |
| import commands | |
| import sys | |
| from functools import partial | |
| CMD = 'git clone {protocol}{sep1}github.com{sep2}{user}/{repo}.git' | |
| make_cmd = lambda **kwargs: CMD.format(**kwargs) | |
| ssh = partial(make_cmd,protocol='git',sep1='@',sep2=':') | |
| https = partial(make_cmd,protocol='https',sep1='://',sep2='/') |
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
| So22222222222222222222222222222o2SoSoeinSo22222*3oSoSo22222222222oSoSo2oSoSoSoSo | |
| 22222222o22222o2222o222221I*11I|I**Xl|+i**|I1i|+|II1*I12222oo2222oo222o2o222o2o2 | |
| 22o22222o22222o2222o22222n||+|+|++||=|+|+|+=||+|+|+|+||*1o222222ooSo22o222222oSo | |
| 22o222o2o222o2oo2o2ooo*1||+|+|++|+|+|+|++|+||++|++|+|+|+|||I*2o22oo222oo22o2o2o2 | |
| 22o22o22o22o22o22o*1|||+++|++|+|+|++|++|+|+++|+|+|+++|++|=|+||iooo222o2o2222o222 | |
| 22222222o22222oeii||+|+|+|+|||+|++|+||+|+||||+||+|+||+|+|+|+||*Soo2222o222222o22 | |
| 222o2222oSo222o1||++|+||||||||||||||||||||||||||||||||||++|++|+|*n2222oo2222o222 | |
| 22oSoSo2o22221i|++|++|||||||||||||||||||||||||||||||||||||+|++|++|*So2o222222222 | |
| 2ooooooooooeii||+|+|||||||i|i|i|||||||||||||||||||||i|||||||||++|iisvooooooooooo | |
| 22222222222ool=|++||||||>=::::::::+++++i|+++++++==;::=<||||||+|+|+i1222oSoS22222 |
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
| # requires twill==0.9 | |
| import sys | |
| from twill import get_browser | |
| from pprint import pprint | |
| class PdfFinder: | |
| browser = None | |
| _b = None | |
| _q = None | |
| links = {} |
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 wtforms import fields | |
| class AceEditorWidget(object): | |
| def __init__(self,mode='python',theme='twilight'): | |
| self.theme = theme | |
| self.mode = mode | |
| self.custom_css = '<style>#editor { width: 100%; }</style>' | |
| self.theme_js = 'editor.setTheme("ace/theme/{theme}");'.format(theme=self.theme) | |
| self.mode_js = 'editor.setOption("mode","ace/mode/{mode}");'.format(mode=self.mode) | |
| self.js = ''' |