![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
代码脚本
jidong108
我们共同在这里IT人生!!!
展开
-
lnmp centos install shell
[code="C"]#!/bin/bash # Check if user is root if [ $(id -u) != "0" ]; then echo "Error: You must be root to run this script, please use root to install lnmp" exit 1 fi clear echo "=...原创 2011-12-29 16:34:46 · 72 阅读 · 0 评论 -
ruby 判断客户端浏览器类型代码
[code="ruby"] def users_browser user_agent = request.env['HTTP_USER_AGENT'].downcase @users_browser ||= begin if user_agent.index('msie') && !user_agent.index('opera') && !user_agent.index('...原创 2012-05-31 18:41:37 · 98 阅读 · 0 评论 -
rails 切割日志 logrotate
# append to config\environment.rb #web访问日志 [code="java"]RAILS_DEFAULT_LOGGER = Logger.new("#{RAILS_ROOT}/log/#{RAILS_ENV}#{Date.today.to_s}.log", "daily") [/code] #sql日志 [code="java"]ActiveRe...原创 2012-02-27 14:09:11 · 216 阅读 · 0 评论