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
| """ | |
| Flask | |
| ----- | |
| Flask is a microframework for Python based on Werkzeug, Jinja 2 and good | |
| intentions. And before you ask: It's BSD licensed! | |
| Flask is Fun | |
| ```````````` |
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 boto.cloudfront import CloudFrontConnection | |
| def update_default_root_object(searched_origin, aws_access_key_id, aws_secret_access_key, default_root_object='index.html'): | |
| """ sets default_root_object of an aws cloud front distribution | |
| for futher information checkout http://boto.s3.amazonaws.com/ref/cloudfront.html | |
| or http://github.com/boto/boto/tree/master/boto/cloudfront | |
| """ | |
| connection = CloudFrontConnection(aws_access_key_id=aws_access_key_id, aws_secret_access_key=aws_secret_access_key) |
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
| Data = require('data') | |
| schema = | |
| '/type/project': | |
| 'type': 'type' | |
| 'name': 'Project' | |
| 'properties': | |
| 'name': | |
| 'name': 'Name', 'unique': true, 'type': 'string', 'required': true | |
| 'tags': |
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
| ArstistPageView = Backbone.View.extend({ | |
| initialize: function(){ | |
| // If model has changed, update view accordingly: | |
| this.model.bind("all", this.render, this); | |
| }, | |
| render: function() { | |
| // fetch the new rendered template from server | |
| templateRequest = $.ajax({ url: "path/to/rendered/artist/template" }) | |
| templateRequest.done(function(data) { | |
| // render the template into dom |
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
| <script type="text/javascript">Raven.setUser({email: '[email protected]', id: '123'})</script> |
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
| Raven.captureMessage('hello world!'); |
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
| <script src="//d3nslu0hdya83q.cloudfront.net/dist/1.0.5/raven.min.js" type="text/javascript"> | |
| </script> | |
| <script type="text/javascript"> | |
| Raven.config('https://[email protected]/3100').install() | |
| </script> |
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
| try { | |
| doSomething() | |
| } catch(error) { | |
| Raven.captureException(error) | |
| } |
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
| library cookie; | |
| import 'dart:html'; | |
| /* | |
| * dart document.cookie lib | |
| * | |
| * ported from | |
| * http://www.quirksmode.org/js/cookies.html | |
| * |
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
| <x-secret placeholder="Choose a Password"></x-secret> |
OlderNewer