Find files containing text and remove them
$ find . -type f -exec grep -q search_term {} \; -exec rm {} \;
PHP + MySQL Resources / Class
Programming, php, MySQL, javascript, html, css .....
1/28/2017
12/04/2016
Configure the subversion server on centos
Now you can follow the steps to create subversion server.
1. Install httpd
# yum -y install httpd
# service httpd start
# chkconfig httpd on
2. Install subversion
# yum -y install subversion mod_dav_svn
# mkdir /var/local/svn
3. Configure subversion
# vi /etc/httpd/conf.d/subversion.conf
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
<Location /svn>
DAV svn
SVNParentPath /var/local/svn
</Location>
4. Create on repos
# svnadmin create /var/local/svn/sample
# chown -R apache:apache /var/local/svn/sample
5. Confirm the repos
Browser
http://example.com/repos/sample/
Output
repos - Revision 0: /
6. Ip permission
# vi /etc/httpd/conf.d/subversion.conf
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
<Location /svn>
DAV svn
SVNParentPath /var/local/svn
+ Order deny,allow
+ Deny from all
+ Allow from xx.xx.xx.xx
</Location>
7. Basic authentication
# vi /etc/httpd/conf.d/subversion.conf
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
<Location /svn>
DAV svn
SVNParentPath /var/local/svn
+ AuthType Basic
+ AuthName "Authorization Realm"
+ AuthUserFile /etc/httpd/passwd/svn-users
+ Require valid-user
</Location>
8. Create authentication file
# htpasswd -c /etc/httpd/passwd/svn-users svn-user-name
1. Install httpd
# yum -y install httpd
# service httpd start
# chkconfig httpd on
2. Install subversion
# yum -y install subversion mod_dav_svn
# mkdir /var/local/svn
3. Configure subversion
# vi /etc/httpd/conf.d/subversion.conf
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
DAV svn
SVNParentPath /var/local/svn
</Location>
4. Create on repos
# svnadmin create /var/local/svn/sample
# chown -R apache:apache /var/local/svn/sample
5. Confirm the repos
Browser
http://example.com/repos/sample/
Output
repos - Revision 0: /
6. Ip permission
# vi /etc/httpd/conf.d/subversion.conf
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
DAV svn
SVNParentPath /var/local/svn
+ Order deny,allow
+ Deny from all
+ Allow from xx.xx.xx.xx
</Location>
7. Basic authentication
# vi /etc/httpd/conf.d/subversion.conf
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
DAV svn
SVNParentPath /var/local/svn
+ AuthType Basic
+ AuthName "Authorization Realm"
+ AuthUserFile /etc/httpd/passwd/svn-users
+ Require valid-user
</Location>
8. Create authentication file
# htpasswd -c /etc/httpd/passwd/svn-users svn-user-name
9/08/2015
Prevent form submit from submiting multiple times by jQuery
If you need to assign a click function dynamically, there is a way to ensure the click function is only assigned once and not duplicated.
Now I show one way based on jquery
Now I show one way based on jquery
# test if ($_POST) { print_r($_POST); $loop = 100000000; for ($i = 0; $i < $loop; $i++) { $b+=1; } echo 'Completed'; } ?>
Subscribe to:
Posts (Atom)