Skip to content

Instantly share code, notes, and snippets.

View almet's full-sized avatar
🗺️

Alexis Métaireau almet

🗺️
View GitHub Profile
strawberry github/tilemill ‹master› ./index.js
Note: Unknown option "updatesVersion" in config file.
Note: Unknown option "updatesTime" in config file.
Plugin [map] loaded.
Plugin [carto] loaded.
Plugin [templates] loaded.
Plugin [fonts] loaded.
Plugin [editor] loaded.
Started [Server Core:20009].
Client window created.
from cornice.validators import (
DEFAULT_VALIDATORS,
DEFAULT_FILTERS,
validate_colander_schema,
)
from cornice.schemas import CorniceSchema
from cornice.util import to_list
class Service(object):
from psutil import Popen
from subprocess import PIPE
# this one works (with shell=False)
Popen(['/usr/bin/python', '-c', 'import time; time.sleep(2)'],
cwd='/home/alexis/dev/github/circus', shell=False, env=None,
close_fds=True, stdout=PIPE, stderr=PIPE, executable=None)
# this one fails (the shell is un-usable after calling it
Popen(['/usr/bin/python', '-c', 'import time; time.sleep(2)'],
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
strawberry github/jenkins-publisher ‹master› bin/jpub https://ci.mozilla.org/rssAll | gist -
Traceback (most recent call last):
File "bin/jpub", line 8, in <module>
load_entry_point('jenkins-publisher==0.1', 'console_scripts', 'jpub')()
File "/home/alexis/dev/github/jenkins-publisher/jpub/__init__.py", line 113, in main
'_updated': updated}
File "/usr/lib/python2.7/shelve.py", line 133, in __setitem__
self.dict[key] = f.getvalue()
File "/usr/lib/python2.7/bsddb/__init__.py", line 279, in __setitem__
_DeadlockWrap(wrapF) # self.db[key] = value
{% extends "base.html" %}
{% block title %}{{ article.title }}{% endblock title %}
{% block content %}
<h1>{{ article.title }}</h1>
<p class="date">{% if article.lang == "fr" %}Publié le{% else %}Published
on{% endif%} {{ article.locale_date }}.
{% if article.translations %}
{% if article.lang == "fr" %}Vous pouvez aussi lire cet article en {% else %}You can also read this article in {% endif %}
{% for tr in article.translations %}
<a href="{{ SITEURL }}/{{ tr.url}}">{{ tr.lang }}</a>
import os
import shutil
import stat
import sys
from tempfile import mkdtemp
from distutils2.database import get_distribution, get_distributions
from distutils2.depgraph import generate_graph
from distutils2.errors import InstallationConflict, InstallationException
from distutils2.index import Client as IndexClient
@almet
almet / app.py
Created August 13, 2012 09:44
Flask + Gevent WSGI Server + PUT method
# you need to install gevent and flask to make this work.
from gevent.wsgi import WSGIServer
from flask import Flask
app = Flask(__name__)
@app.route('/resource', methods=['PUT', 'GET'])
def update_renderer():
return "ok"
@almet
almet / marketplace_installation.rst
Created September 26, 2012 10:17 — forked from tarekziade/marketplace_installation.rst
Installing Marketplace in Ubuntu 12.04
@almet
almet / marketplace_installation.rst
Created October 2, 2012 11:07 — forked from tarekziade/marketplace_installation.rst
Installing Marketplace in Ubuntu 12.04