2014-07-10 聚會手記

上一週 || 下一週

Table of Contents

Johnson

dnf - a package manager based on yum and libsolv
https://github.com/akozumpl/dnf
nftables - Program to control packet filtering rules by Netfilter project

Sam

Home · kripken/emscripten Wiki
https://github.com/kripken/emscripten/wiki

philipz

jimeh/tmuxifier
https://github.com/jimeh/tmuxifier

yan

Dust-Me Selectors - Scans your website to find unused CSS selectors
Scan this page -> Used Selectors -> find out "No used selector"
https://addons.mozilla.org/en-US/firefox/addon/dust-me-selectors/

用Supervisord管理Python进程 | @飞龙非龙
http://feilong.me/2011/03/monitor-processes-with-supervisord
用monit监控系统关键进程 | @飞龙非龙
http://feilong.me/2011/02/monitor-core-processes-with-monit

$ vi test.py
import sys
import time
import datetime
while 1:
    print datetime.datetime.now()
    sys.stdout.flush()  # 在 supervior 裏讓 stdout 快點輸出到 log
    time.sleep(2)
# vi /etc/supervisor/supervisord.conf
; 啓用 Web 管理界面
[inet_http_server]
port=9001
; username = admin
; password = admin

[program:test]
command=/usr/bin/python test.py
process_name=test
numprocs=1
directory=/tmp
autostart=true
autorestart=true
user=yan
stopsignal=KILL
stdout_logfile=/tmp/test_stdout.log
stderr_logfile=/tmp/test_stderr.log
# supervisorctl
supervisor> status
supervisor> restart PROGRAM
>>> import xmlrpclib
>>> server = xmlrpclib.ServerProxy('http://localhost:9001')
>>> server.system.listMethods()
>>> server.supervisor.getAllProcessInfo()
除非特別註明,本頁內容採用以下授權方式: Creative Commons Attribution-ShareAlike 3.0 License