Skip to content

Instantly share code, notes, and snippets.

@period331
period331 / fpm.d目录下的www.conf
Last active April 25, 2016 04:27
nginx-php开发环境配置
;;;;;;;;;;;;;;;;;;;;;;;
; Pool Definitions ;
; 只关注需要修改的配置;
;;;;;;;;;;;;;;;;;;;;;;;
; 以登陆用户的用户名和分组,避免权限问题
user = baocaixiong
group = staff
; The address on which to accept FastCGI requests.
""" An example of a Linux daemon written in Python.
Based on http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/
The changes are:
1 - Uses file open context managers instead of calls to file().
2 - Forces stdin to /dev/null. stdout and stderr go to log files.
3 - Uses print instead of sys.stdout.write prior to pointing stdout to the log file.
4 - Omits try/excepts if they only wrap one error message w/ another.
@period331
period331 / test.py
Created July 17, 2020 06:09
命令行布局管理器 Python命令行下多行刷新
# -*- coding:utf8 -*-
import time,sys
def progressbar():
print 'Loading...'
print "[+] start to build...."
height = 4
for i in range(0, 100):
if i > 0:
sys.stdout.write(u'\u001b[1A')
time.sleep(0.1)