There are certain circumstances where it’s desirable to force files hosted on an Apache web server to download rather than rendering in the browser. This can be accomplished using the following .htaccess file… Continue reading
Tag Archives: web development
SVN on Ubuntu
Leave a reply
Repository Location: /var/lib/submin/svn
/etc/apache2/sites-available/fender-svn.alias
# /submin and /svn from /etc/submin/default-apache-cgi.conf
Alias /submin /usr/share/submin/www
<Directory /usr/share/submin/www>
Options ExecCGI FollowSymLinks
AddHandler cgi-script py cgi pl
SetEnv SUBMIN_CONF /etc/submin/default.conf
RewriteEngine on
RewriteBase /submin
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ submin.cgi/$1
RewriteRule ^/?$ submin.cgi/
Order Allow,Deny
Allow from all
</Directory>
<Location /svn>
DAV svn
SVNParentPath /var/lib/submin/svn
AuthzSVNAccessFile /var/lib/submin/authz
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /var/lib/submin/htpasswd
Require valid-user
Order Allow,Deny
Allow from all
Satisfy Any
</Location>
Alias /websvn "/var/www/websvn/"
<Directory "/var/www/websvn/">
Options -Indexes -FollowSymLinks
AllowOverride None
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /var/lib/submin/htpasswd
Require valid-user
Order Allow,Deny
Allow from all
Satisfy All
</Directory>
Netbeans Installation and Import from Subversion Repository
Package Installation:
- Install the Java Development Kit from here.
- Install the Netbeans PHP Bundle from here.
- Install the CollabNet Subversion Client for Netbeans from here.
Configuration:
- Start the NetBeans IDE
- Tools menu > Plugins … Install the “Bundled Subversion Client for Windows” plugin.
- Tools menu > Options >> Misc page > Versioning tab > Subversion …
Path to the SVN executable: CollabNet SVN Client installation folder
Import Project from Subversion Repository:
- Team Menu > Subversion >Checkout…
- Note that NetBeans project Run properties will need to be manually configured.
Simple PHP script to Tar a folder
Here it is…
<?php
$path = explode("/",realpath('./'));
$filename = date("Y-m-d_His") . "_" . array_pop($path);
echo "<pre>Compressing ./* to ../${filename}.tgz</pre>";
$output = shell_exec('tar -cvz --exclude "./dotar.php" -f ../' . $filename . '.tgz ./*');
echo "<pre>$output</pre>";
echo "<pre>Done.</pre>";
?>