View fabfile.py
"""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 |
View gist:f359766d1c750f6b6cb2
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() |
View gist:b1557ea2a151ffb2c9b3
def recv_future(zmqstream): | |
''' Retruns future for recv on zmqstream | |
''' | |
future = Future() | |
def _finish(reply): | |
future.set_result(reply) | |
zmqstream.on_recv(_finish) |
View gist:2c9a0f77aa64fc87079f
{% 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 |
View gist:7c295329e7ec4a04d423
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) |
View gist:87bf5fc9fba604ececa0
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 |
View gist:2e4b36ac55946ff0ba3b
import asyncio | |
from aiohttp.web import Application, Response | |
@asyncio.coroutine | |
def resource(request): | |
return Response(text=repr(request.match_info)) | |
@asyncio.coroutine |
View gist:905361
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 |
View gist:905362
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