(Create a symlink pytest for py.test)
pytest [options] [file_or_dir] [file_or_dir] ...
Help:
#!/usr/bin/env python | |
""" | |
Extract metrics from a uWSGI log file | |
This should be saved as /etc/zabbix/pluginx/uwsgi_stats and called from | |
/etc/zabbix/zabbix_agentd.conf.d/uwsgi.conf, which should have contents: | |
UserParameter=uwsgi.stats[*],/etc/zabbix/plugins/uwsgi_stats $1 $2 | |
To gather these metrics in Zabbix, create a new item which calls this plugin and |
from django.http import StreamingHttpResponse | |
from wsgiref.util import FileWrapper | |
import mimetypes | |
import os | |
import re | |
range_re = re.compile(r'bytes\s*=\s*(\d+)\s*-\s*(\d*)', re.I) | |
class RangeFileWrapper (object): | |
def __init__(self, filelike, blksize=8192, offset=0, length=None): |
image_url = og.get('image') | |
if image_url: | |
import urllib2 | |
from django.core.files import File | |
from django.core.files.temp import NamedTemporaryFile | |
img_temp = NamedTemporaryFile(delete=False) | |
img_temp.write(urllib2.urlopen(image_url).read()) | |
img_temp.flush() | |
import os |
HandBrakeCLI --input 88Min_20_v2.mov --output 88Min_20_v2-handbrake.mp4 --large-file --optimize --encoder x264 --x264-preset medium --x264-profile high --x264-tune zerolatency --encopts level=3.1:vbv-bufsize=17500:vbv-maxrate=17500 --quality 22 --width 960 --height 540 --pixel-aspect 1:1 --decomb
echo "<?php include('openvpn.inc'); openvpn_resync_all();?>" | php -q |
========================================== ========================================== | |
TMUX COMMAND WINDOW (TAB) | |
========================================== ========================================== | |
List tmux ls List ^b w | |
New new -s <session> Create ^b c | |
Attach att -t <session> Rename ^b , <name> | |
Rename rename-session -t <old> <new> Last ^b l (lower-L) | |
Kill kill-session -t <session> Close ^b & |