mysql unix_timestamp()不带参数时得到的是unix时间戳,和时区无关的,即utc timestamp,unix_timestamp(date)带date参数时和时区有关。与之相反的mysql时间转换函数函数from_unixtime(timestamp或timestamp字段) 也与MySQL中设置的时区有关
另外几个nginx关于timeout的参数配置: 1. send_timeout (默认60s): Specifies the response timeout to the client. This timeout does not apply to the entire transfer but, rather, only between two subsequent client-read operations. Thus, if the client has not read any data for this amount of time, then nginx shuts down the connection.
2. keepalive_timeout timeout [header_timeout]: 默认为65s, 比 fastcgi_read_timeout 多5秒, 意思是: 第一个参数设置客户端的长连接在服务器端保持的最长时间(在此时间客户端未发起新请求,则长连接关闭)。 第二个参数为可选项,设置“Keep-Alive: timeout=time”响应头的值。
3. keepalive_requests: 设置通过一个长连接可以处理的最大请求数。 请求数超过此值,长连接将关闭。
比如keepalive_timeout 为60s, keepalive_requests 为100, 那么最理想的状态是 60 * 100 s内长连接(keep-alive connection,或persistent connection)都不会关闭.
Firefox的vimperator 比vimium 强大很多啊..!!web qq用chrome, 平时准备用firefox了..
Ubuntu 下chrome 浏览器不支持web qq截图,一种替代方法是使用scrot等截图应用,配合gimp,再设置快捷键,达到相同的效果: 安装了scrot和gimp后,在系统设置->键盘->快捷键->自定义快捷键中添加设置命令为: scrot -s ‘/home/harry/temp.png’ -e ‘gimp $f’ 每次截图会自动覆盖原来的同名图片.和在终端中直接运行命令不一样的是,截图保存地址一定要用绝对路径,使用中发现用’~/temp.png’ 无效. 然后点击”禁用”两字设置快捷键.
firefox 老是提示adobe flash 没有安装 unknow plugin (aaplication/x-shockwave-flash), 到页面http://get.adobe.com/flashplayer/ 下载apt for ubunut 10.04+ ,跳转到软件中心安装 Adobe Flash Player plugin version 11. 重启还是不行. 然后下载adobe 上的 .tar.gz 解压后根据readme.txt 安装才可以..
ubuntu: 一直感觉 fcitx的词库有点那个少了,, 发现可以导入搜狗输入法的词库. 用起来不错!!!
直接选择 自带的google拼音输入法貌似词库也好一些
终端的编辑快捷键:
ctrl+a or Home
移动游标到行首.
ctrl+e or End
移动游标到行尾.
ctrl+b
移动游标到上一个或当前单词的前面.
ctrl+k
删除从当前游标到行尾的文字.
ctrl+u
删除当前整行.
ctrl+w
删除游标前的单词.
多标签的方式[Shift + Ctrl + T] 或者以多个独立窗口的方式[Shift + Ctrl + N]
tab 命令补全
用vim给每行或某部分行开头或结尾批量添加字符原来这么简单:~:
如全文每行行尾加引号: :%s/$/”/g, 行头: :%s/^/”/g.. 忘了还有正则表达式这东西了.
用\r在某字符后换行: :%s/abcdef/abc\rdef/g
每日三省: 今天做了什么? 离目标还差多少? 下一刻应该做什么?
mysql unix_timestamp()不带参数时得到的是unix时间戳,和时区无关的,即utc timestamp,unix_timestamp(date)带date参数时和时区有关。与之相反的mysql时间转换函数函数from_unixtime(timestamp或timestamp字段) 也与MySQL中设置的时区有关
gliffy.com 在线的流程图绘制工具, 挺好用!
在命令行快速切换目录的脚本: http://www.ccvita.com/520.html
http 1.0 和1.1 对于keep-alive的区别: http://blog.csdn.net/logosliu/article/details/6415499
Nginx + fastcgi 执行60秒后过期, 是因为从fastcgi server 读取数据没有返回超时, 设置 fastcgi_read_timeout 300; 可以延长 (默认60s).
另外几个nginx关于timeout的参数配置: 1. send_timeout (默认60s): Specifies the response timeout to the client. This timeout does not apply to the entire transfer but, rather, only between two subsequent client-read operations. Thus, if the client has not read any data for this amount of time, then nginx shuts down the connection.
2. keepalive_timeout timeout [header_timeout]: 默认为65s, 比 fastcgi_read_timeout 多5秒, 意思是: 第一个参数设置客户端的长连接在服务器端保持的最长时间(在此时间客户端未发起新请求,则长连接关闭)。 第二个参数为可选项,设置“Keep-Alive: timeout=time”响应头的值。
3. keepalive_requests: 设置通过一个长连接可以处理的最大请求数。 请求数超过此值,长连接将关闭。
比如keepalive_timeout 为60s, keepalive_requests 为100, 那么最理想的状态是 60 * 100 s内长连接(keep-alive connection,或persistent connection)都不会关闭.
php 中的 stream_set_timeout ( resource $stream , int $seconds [, int $microseconds = 0 ] )
可以设置get stream 的超时时间
ean-13 条形码只能识别前面12位,最后一位为校验码, 其他条码条数较少(适合针式打印机打印条码分辨率不高的情况)的条形码种类有 code128.
有些条码类型如 code 39 可以自己选择是否需要校验
在一个网页上批量分页打印几部分内容,用css即可:
<div style=”page-break-before: auto;page-break-after: always;”>第一页</div>
<div style=”page-break-before: auto;”>最后一页</div>
原来 domain/order/payment/?showwxpaytitle=1 无法发起微信支付, 一定要要去掉最后的/, 该死的斜杠, 调了老半天.
另外发起微信共享收货地址值得注意的一个有个 url参数, 传入的url必须和当前的url地址完全一样, 包括request_uri , get请求参数. 否则iPhone 提示 {err_msg:get_brand_grant_info:fail,err_desc:no authorized buffer empty} 错误, Android 提示 err_msg: edit_address:fail
ubuntu chrome 标签标题中文乱码,解决办法就是:
编辑/etc/fonts/conf.d/49-sansserif.conf
将第一次出现的sans-serif改为ubuntu即可正常显示中文。(或在第一条中添加一条系统已经安装的字体)
该更示例如下:
ubuntu