This file contains 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
"""Deployment tasks using fabric | |
""" | |
import sys | |
from os.path import join, abspath, dirname, expanduser, exists, normpath | |
from fabric.api import prompt, env, sudo, put, task, local, run, cd | |
# from settings import settings | |
from fabric.colors import green, red | |
from shutil import copy |
This file contains 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 tornado.platform.asyncio import AsyncIOMainLoop | |
import asyncio | |
import tornado | |
import tornado.web | |
import tornado.gen | |
from inspect import isgeneratorfunction, isgenerator | |
AsyncIOMainLoop().install() | |
loop = asyncio.get_event_loop() |
This file contains 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
def recv_future(zmqstream): | |
''' Retruns future for recv on zmqstream | |
''' | |
future = Future() | |
def _finish(reply): | |
future.set_result(reply) | |
zmqstream.on_recv(_finish) |
This file contains 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
{% if grains.os_family == 'Debian' %} | |
java7_read_license: | |
cmd.run: | |
- name: "echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections" | |
- unless: 'debconf-get-selections | grep "shared/accepted-oracle-license-v1-1"' | |
- require: | |
- pkg: debconf-utils | |
- require_in: | |
- pkg: java7_packages |
This file contains 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
import inspect | |
import sys | |
def _get_code_id(callable): | |
if inspect.ismethod(callable): | |
return id(callable.im_func.func_code) | |
elif inspect.isfunction(callable): | |
return id(callable.func_code) |
This file contains 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, render_template | |
app = Flask(__name__) | |
def gen_page(page): | |
def endpoint(): | |
return render_template(page, page_name=page) | |
endpoint.__name__ = page |
This file contains 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
import asyncio | |
from aiohttp.web import Application, Response | |
@asyncio.coroutine | |
def resource(request): | |
return Response(text=repr(request.match_info)) | |
@asyncio.coroutine |
This file contains 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 28011b22beb3da18c3b1cc863cd415fffb4c40d7 Mon Sep 17 00:00:00 2001 | |
From: FELD Boris <lothiraldan@gmail.com> | |
Date: Wed, 6 Apr 2011 10:52:51 +0200 | |
Subject: [PATCH 2/2] Omission of article_infos in index template | |
--- | |
notmyidea-cms/templates/index.html | 13 +------------ | |
1 files changed, 1 insertions(+), 12 deletions(-) | |
diff --git a/notmyidea-cms/templates/index.html b/notmyidea-cms/templates/index.html |
This file contains 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 a2eb43ec131512743f2a61d3e382dbc3dda26576 Mon Sep 17 00:00:00 2001 | |
From: FELD Boris <lothiraldan@gmail.com> | |
Date: Wed, 6 Apr 2011 10:21:09 +0200 | |
Subject: [PATCH] Move articles infos into article_infos template | |
--- | |
notmyidea-cms/templates/article.html | 14 +------------- | |
notmyidea-cms/templates/article_infos.html | 14 ++++++++++++++ | |
notmyidea-cms/templates/index.html | 15 +-------------- | |
3 files changed, 16 insertions(+), 27 deletions(-) |
OlderNewer