# Example how to add rich editor capabilities to your models in admin. | |
from django.contrib.admin import site, ModelAdmin | |
import models | |
# we define our resources to add to admin pages | |
class CommonMedia: | |
js = ( | |
'https://ajax.googleapis.com/ajax/libs/dojo/1.6.0/dojo/dojo.xd.js', |
import os | |
from buildbot.steps.shell import ShellCommand | |
from buildbot.process.properties import WithProperties | |
import stat | |
import StringIO | |
import re | |
class NoseTest(ShellCommand): | |
report_path = '/var/www/testreport/%s.html' | |
#coding: utf-8 | |
from logging.handlers import SMTPHandler as _SMTPHandler | |
class SMTPHandler(_SMTPHandler): | |
def __init__(self, *args, **kwargs): | |
super(SMTPHandler, self).__init__(*args, **kwargs) | |
self._timeout = 15 |
from flask import Flask | |
app=Flask(__name__) | |
@app.route('/') | |
def index(): | |
return """ | |
<span id="now">loading<span> | |
<script type="text/javascript"> | |
window.WebSocket=window.WebSocket || window.MozWebSocket || false; |
#!/bin/sh | |
# System Update | |
pacman --noconfirm -Syu | |
#The essentials | |
pacman --noconfirm -S base-devel vim git | |
# Packer (AUR Helper) | |
cd /tmp |
[Unit] | |
Description=iperf3 server | |
After=syslog.target network.target auditd.service | |
[Service] | |
User=iperf | |
ExecStart=/usr/bin/iperf3 -s --logfile /var/log/iperf.log | |
[Install] | |
WantedBy=multi-user.target |
There's enough trouble with puppet's ssl model (mandatory client certs) that people go and do odd things to get around it. The primary problem is that for lab/preproduction environments, if you reinstall machines frequently, you lose access to the private key that generated the original cert but (absent some puppet cert --clean [node]
operation) the cert still exists, leading to the dreaded Retrieved certificate doesn't match private key
error.
Generate a single client certificate which all your nodes use, and have the master determine node names from facter rather than the SSL DN. This way you can re-install nodes with impunity and as long as your bootstrap plops down the correct config and the cert+key, you don't have any more SSL issues.
If you have autosign turned on, this change represents a shift in security tradeoffs: you can turn off autosign and therefore more tightly control which clients can talk to your server because they need to have your clie
Graphite does two things:
- Store numeric time-series data
- Render graphs of this data on demand
What Graphite does not do is collect data for you, however there are some tools out there that know
#views.py | |
from django.views.generic import UpdateView | |
class UpdateBook(UpdateView): | |
model = Book | |
form_class = BookForm | |
template_name = 'create_form.html' | |
success_url = '/books/' |