start new:
tmux
start new with session name:
tmux new -s myname
# Configuration file for /sbin/dhclient, which is included in Debian's | |
# dhcp3-client package. | |
# | |
# This is a sample configuration file for dhclient. See dhclient.conf's | |
# man page for more information about the syntax of this file | |
# and a more comprehensive list of the parameters understood by | |
# dhclient. | |
# | |
# Normally, if the DHCP server provides reasonable information and does | |
# not leave anything out (like the domain name, for example), then |
Just a compilation of links for syslog reference.
import logging | |
# Just a simple way to output or print data on the console's stdout | |
logger = logging.getLogger('django') | |
logger.info("TEST") |
from django.db import connection | |
from django.test import TestCase | |
from ..behaviors import WalletIntegration | |
class TestModel(WalletIntegration): | |
class Meta: | |
app_label = 'test' |
class Jug: | |
def __init__(self): | |
self.exception_handlers = {} | |
def errorhandler(self, exception): | |
def decorator(f): | |
self.exception_handlers[exception] = f | |
return f | |
return decorator |
from flask import Flask, jsonify, request, render_template | |
app = Flask(__name__) | |
@app.route('/page/<name>/') | |
def page(name): | |
return render_template('hello.html', name=name) | |
@app.route('/api/get/') |
from celery import Celery | |
from flask import Flask, jsonify, request, render_template | |
def make_celery(app): | |
celery = Celery(app.import_name, | |
broker=app.config['CELERY_BROKER_URL'], | |
backend=app.config['CELERY_RESULT_BACKEND']) | |
celery.conf.update(app.config) | |
TaskBase = celery.Task |