If you’re using SVN to control your web application, your certainly need to deny access to .svn sub-directories.
<DirectoryMatch "^/.*/\.svn/">
Order allow,deny
Deny from all
</DirectoryMatch>
$HTTP["url"] =~ "/\.svn/" {
url.access-deny = ( "" )
}
This entry was written by , posted on May 28, 2008 at 7:17 am, filed under http and tagged apache, lighttpd, svn. Leave a comment or view the discussion at the permalink.
Sometimes you need to retrieve a single file from SVN without doing a checkout on the repository.
SVN provides the svn cat to output the content of a file. You can redirect the output to get the file as :
svn cat https://svn.mydomain.com/project/folder/file.ext > file.ext
You can also use a simple shell script to do the work :
$ cat svnget
#!/bin/sh
if [ -z "$1" ]; then
echo
echo "Usage : $0 <SVN-URL>"
echo
exit
fi
fn=`basename $1`
svn cat $1 > $fn
This entry was written by , posted on May 23, 2008 at 7:51 am, filed under Command line and tagged svn. Leave a comment or view the discussion at the permalink.
After two years of using Pound, WordPress decided to switch to Nginx as software load balancers for WordPress.com. Read the full story on Barry’s Blog.
This entry was written by , posted on May 8, 2008 at 7:12 am, filed under http and tagged load balancer. Leave a comment or view the discussion at the permalink.
If like me you use iTerm for your terminal sessions, this is the tips to dynamically set the tab title.
As I’m using the bash shell, the tab title can be automatically set with the PROMPT_COMMAND variable. You can set this variable in /etc/profile or in your .bashrc
Mine is like this :
export PROMPT_COMMAND=’echo -ne “\033]0;${USER}@${HOSTNAME%%.*}\007″‘
The content of the variable is executed each time bash prints your prompt. Here echo is executed with the escape sequence to set the term title.
Some readings about this subject :
This entry was written by , posted on May 7, 2008 at 2:10 pm, filed under Command line and tagged bash, iTerm. Leave a comment or view the discussion at the permalink.
server.modules += ( "mod_redirect" )
$HTTP["host"] =~ "^domain\.com$" {
url.redirect = ( "^/(.*)" => "http://www.domain.com/$1" )
}
$HTTP["host"] =~ "^www\.domain\.com$" {
url.redirect = ( "^/(.*)" => "http://domain.com/$1" )
}
$SERVER["socket"] == ":80" {
$HTTP["host"] =~ "(.*)" {
url.redirect = ( "^/(.*)" => "https://%1/$1" )
}
}
$HTTP["host"] =~ "^www1\.domain\.com" {
url.redirect = ( "^/(.*)" => "http://www.domain.com/$1" )
}
Lets say that you want to redirect http://www.domain.com/party to http://blog.domain.com/party while you have a mod_rewrite rule on www.domain.com that redirect all URLs to a controller (“^(.*)$” => “/index.php$1″).
Your redirect will not work because mod_rewrite always execute before redirect rules. To bypass this, you need to use the $0 as the rule target to pass URLs through unmangled.
e.g.
url.redirect = ( "^/party(.*)" => "http://blog.domain.com/party$1" ) url.rewrite-once = ( "^/party" => "$0" )
tested with lighttpd 1.4.x
This entry was written by , posted on May 6, 2008 at 12:56 pm, filed under http and tagged lighttpd. Leave a comment or view the discussion at the permalink.
As read here, this is my command line history on my MacBook :
This entry was written by , posted on May 2, 2008 at 5:54 pm, filed under Command line and tagged history. Leave a comment or view the discussion at the permalink.