添加服务到/etc/rc.local 如自动拉起apache服务: /etc/rc.local: #!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff. touch /var/…
https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks https://github.com/git/git/blob/master/templates/hooks--commit-msg.sample 8.3 Customizing Git - Git Hooks Git Hooks Like many other Version Control Systems, Git has a way to fire off custom scr…
一.我们先看看编写的shell脚本的内容,该shell的作用主要是实现监控某个程序崩溃之后就自动重启该进程. while true do procnum=` ps -ef|grep "test"|grep -v grep|wc -l` if [ $procnum -eq 0 ]; then /home/test& fi sleep 30 done -eq意思是等于0,用于判断该test是否还在运行状态.监控/home/test这个程序是否运行. 二.由于该程序是window上的…
在写上篇文章<spring整合springmvc和hibernate>的时候,曾遇到一个问题 INFO: Server startup in 8102 ms Hibernate: insert into t_user (name, password) values (?, ?) Mar 31, 2018 5:47:19 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for se…
c++11 允许声明一个变量或对象(object)而不需要指明其类型,只需说明它是auto. 1.如: auto i = 42: //i是整型 double f(); auto d=f(); //d是双精度类型 2.如果类型很长或表达式很复杂时,auto特别有用,如: vector<string> v: auto pos = v.begin(); //pos has type vector<string>::iterator //注意:如果v提供成员函数begin()和end(…