首页 > 其他
日志切割
先来写一个nginx日志切割的脚本vim/usr/local/sbin/nginx_logrotate.shd=`date-d"-1day"+%Y%m%d`[-d/tmp/nginx_log]||mkdir/tmp/nginx_logmv/tmp/access.log/tmp/nginx_log/$d.log/etc/init.d/nginxreload2>/dev/nullgzip-f$d.log然后写一个计划任务,每天0点0分执行该脚本
分类:其他   时间:2016-01-04 07:42:55    收藏:0  评论:0  赞:0  阅读:115
访问控制
可以对admin.php访问进行控制location~.*admin\.php${allow127.0.0.1; denyall;includefastcgi_params;fastcgi_passunix:/tmp/www.sock;fastcgi_indexindex.php;fastcgi_paramSCRIPT_FILENAME/data/www$fastcgi_script_name;}也可以针对全局配置server{listen80;server_namewww..
分类:其他   时间:2016-01-04 07:42:25    收藏:0  评论:0  赞:0  阅读:140
nginx代理
vim/usr/local/nginx/conf/vhosts/proxy.confserver{ listen80; server_namewww.baidu.com; localtion/{ proxy_pass http://ip/;proxy_set_headerHost$host; proxy_set_headerX-Real-IP$remote_addr;}}digwww.baidu.com查看百度有多少ip如果后端的机器有多台,还可以用upstream..
分类:其他   时间:2016-01-04 07:42:05    收藏:0  评论:0  赞:0  阅读:167
盘点程序员可以在上面捡钱的共享经济产品
有一些共享经济类型的产品,程序员利用自己的技能和经验,在上面,不但可以帮助别人,还能赚不少钱……...
分类:其他   时间:2016-01-04 07:41:15    收藏:0  评论:0  赞:0  阅读:218
LeetCode - Partition List
题目:Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should preserve th...
分类:其他   时间:2016-01-04 07:40:44    收藏:0  评论:0  赞:0  阅读:141
Ad Hoc
Ad Hoc源自于拉丁语,意思是"for this"引申为"for this purpose only",即"为某种目的设置的,特别的"意思,即Ad hoc网络是一种有特殊用途的网络。IEEE802.11标准委员会采用了"Ad hoc网络"一词来描述这种特殊的自组织对等式多跳移动通信网络,Ad ho...
分类:其他   时间:2016-01-04 07:40:34    收藏:0  评论:0  赞:0  阅读:243
*3Sum Smaller
Given an array ofnintegersnumsand atarget, find the number of index tripletsi, j, kwith0 <= i < j < k < nthat satisfy the conditionnums[i] + nums[j] +...
分类:其他   时间:2016-01-04 07:40:24    收藏:0  评论:0  赞:0  阅读:280
2Sum II - Input array is sorted
Given an array of integers that is alreadysorted in ascending order, find two numbers such that they add up to a specific target number.The function t...
分类:其他   时间:2016-01-04 07:40:04    收藏:0  评论:0  赞:0  阅读:242
我要谈一谈我这个人
我想列举出我身上所有的劣根性,这一点品质我总觉得是好的,因为从小我就被教导着要学会自我批评,所以在这方面,我觉悟还是有基础的...
分类:其他   时间:2016-01-04 06:37:45    收藏:0  评论:0  赞:0  阅读:286
Sparse Matrix Multiplication
Given twosparse matricesAandB, return the result ofAB.You may assume thatA's column number is equal toB's row number.Example:A = [ [ 1, 0, 0], [-1, .....
分类:其他   时间:2016-01-04 06:36:24    收藏:0  评论:0  赞:0  阅读:495
less使用001
官网:http://lesscss.org/ .中文文档直接百度搜索less,能找到N多网站提供的支持.less-gui,使用国产的koala, 其中文帮助文档地址. 拖拽一个目录到考拉就新建了一个工程,比较方便.但是,这样并没有完成. 还需要新建一个配置文件. 右键项目,具体可以看帮助文档->项目...
分类:其他   时间:2016-01-04 06:36:15    收藏:0  评论:0  赞:0  阅读:178
《世界是数字的》读书笔记 三
《世界是数字的》读书笔记 三第六章 软件系统操作系统是软件中的基础层,他负责管理计算机硬件,并为其他被称作应用程序的程序运行提供支持。6.1操作系统操作系统控制和分配计算机资源。首先,他负责管理CPU,调度和协调当前运行的程序。操作系统通常都需要管理数十个同时运行的进程或任务。 其次,操作系统管理R...
分类:其他   时间:2016-01-04 06:35:54    收藏:0  评论:0  赞:0  阅读:167
关于安装 rst2pdf 时遇到的 setuptools过老的问题
由于想把flask里面的.rst文档 转一些成pdf方便查看和翻阅(.rst文档都非常新一直在维护)所以查到一个模块rst2pdf 安装好之后却发现警告里面提示我的setuptools版本过老无法运行。这个依赖恨奇怪,pip 也依赖这个包 所以我本来准备按照以前的更新操作习惯使用sudo pip u...
分类:其他   时间:2016-01-04 06:35:24    收藏:0  评论:0  赞:0  阅读:199
膝盖中了一箭之康复篇-第六个月
时间过的很快,已经术后半年了。12月份照样出差,不过地点比较固定,就呆在深圳。之前9月份的时候曾经在深圳这边的健身房练过一段时间,所以这次酒店还选择的是上次那家,就为了能在健身房好好恢复一下腿部肌肉。但是不巧的是我去过的那家健身房关门了,不得已找了一家远一点的。就这样开始了力量训练,一周能去个3到4...
分类:其他   时间:2016-01-04 06:35:05    收藏:0  评论:0  赞:0  阅读:266
让编译器对一些警告闭嘴
1、方法启用告警 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" //code #pragma clang diagnostic pop2.不兼容指针类型#pragm...
分类:其他   时间:2016-01-04 06:34:24    收藏:0  评论:0  赞:0  阅读:178
解决从pip上下载的最新flask版本不能运行flaskr和最新特性的问题
由于在测试flask的单元测试。所以准备弄个环境,查询官方文档发现flask源码里面有一个example文件夹里面有个flaskr应用 可供测试看了一下readme文档,大致是这样 / Flaskr / a minima...
分类:其他   时间:2016-01-04 06:34:14    收藏:0  评论:0  赞:0  阅读:373
Divide Two Integers
Quesiton from:https://leetcode.com/problems/divide-two-integers/题目:Divide two integers without using multiplication, division and mod operator.If it i...
分类:其他   时间:2016-01-04 06:34:05    收藏:0  评论:0  赞:0  阅读:178
[ES6] Array -- Destructuring and Rest Parameters && for ..of && Arrat.find()
We can use the destructing and rest parameters at the same time when dealing with Array opration.Example 1:let [first, ...remainingUsers] = ["Sam", "T...
分类:其他   时间:2016-01-04 06:33:44    收藏:0  评论:0  赞:0  阅读:429
Runloop 运行循环
什么是RunLoop运行循环一个线程对应一个RunLoop,主线程的RunLoop默认已经启动,子线程的RunLoop得手动启动(懒加载, 调用currentRunLoop方法)RunLoop只能选择一个Mode启动,如果当前Mode中没有任何Source(Sources0、Sources1)、Ti...
分类:其他   时间:2016-01-04 06:33:36    收藏:0  评论:0  赞:0  阅读:326
DSP2812学习笔记-内部Flash启动过程
2812从内部flash启动的详细流程说明:a)程序硬件复位或者软件复位b)判断mp/mc是否为0,为0则从bootrom启动,否则从外部启动(见附录1)c)到bootrom的0x3FFFC0处取出复位向量,跳到boot函数d)采集IO管脚状态,根据IO状态选择boot方式(见附录2)e)如果是fl...
分类:其他   时间:2016-01-04 06:33:14    收藏:0  评论:0  赞:0  阅读:703
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!