I hereby claim:
- I am moschlar on github.
- I am moschlar (https://keybase.io/moschlar) on keybase.
- I have a public key whose fingerprint is 19F9 B5A8 821A 081E FE92 D306 45D3 DBDD FBDD 8888
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| import time | |
| class Timer(object): | |
| def __init__(self, echo=False): | |
| self._start = 0.0 | |
| self._stop = 0.0 | |
| self.echo = echo | |
| def __enter__(self): | |
| self._start = time.time() |
| def add_error_middleware(self, global_conf, app): | |
| """Add middleware which handles errors and exceptions.""" | |
| from pylons.middleware import report_libs, StatusCodeRedirect | |
| from tg.error import ErrorHandler | |
| #from raven import Client | |
| #from raven.middleware import Sentry as WSGISentry | |
| #app = WSGISentry(app, Client(config.get('sentry.dsn'))) | |
| from raven.contrib.pylons import Sentry as PylonsSentry | |
| app = PylonsSentry(app, config) |
| class Genre(DeclarativeBase): | |
| __tablename__ = "genres" | |
| genre_id = Column(Integer, primary_key=True) | |
| name = Column(String(100)) | |
| description = Column(String(200)) | |
| @property | |
| def _name(self): | |
| return '%s (%s)' % (self.name, self.description) |
| main = putStrLn "Hello, World!" |
| #include <stdio.h> | |
| #include <time.h> | |
| /* TODO: resume.h */ | |
| typedef struct { | |
| char * company; | |
| char * location; | |
| char * title; |
| # Copyright 1999-2012 Gentoo Foundation | |
| # Distributed under the terms of the GNU General Public License v2 | |
| # $Header: $ | |
| EAPI=4 | |
| inherit eutils latex-package | |
| # All acroread related stuff is gracefully stolen from app-text/acroread/acroread-9.5.1-r1.ebuild | |
| ACROREAD_LICENSE="Adobe" |
| import os | |
| import tw2.core as twc | |
| import tw2.forms as twf | |
| ace_js = twc.JSLink( | |
| modname=__name__, | |
| filename='static/ace/ace.js', | |
| edit=twc.js_function('ace.edit'), | |
| require=twc.js_function('ace.require'), |
| <script type="text/javascript">ace.require("ace/ext/textarea").transformTextarea(document.getElementById("source")).getSession().setMode("ace/mode/java")</script> | |
| <script type="text/javascript">ace.require("ace/ext/textarea").transformTextarea(document.getElementById("source")).getSession().setMode("ace/mode/java").getSession().setMode("ace/mode/java")</script> |