Protect .svn directories server-wide (Apache)
// for server-wide protection; goes in httpd.conf
// there's a separate snippet for .htaccess-based code
<DirectoryMatch "^/.*/(\.svn|CVS)/"> Order deny,allow Deny from all DirectoryMatch>
2768 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
<DirectoryMatch "^/.*/(\.svn|CVS)/"> Order deny,allow Deny from all DirectoryMatch>
SELECT * FROM information_schema.columns WHERE table_name = 'Customers'
AddType application/x-httpd-php .htm .php
require 'webrick' # The :AccessLog configuration takes an array. # Each element of the array should be # a two-element array where the first element # is the stream (or anything responding to <<) and # the second element is the access log format. # Please see webrick/accesslog.rb for available formats. access_log_stream = File.open('C:\\Documents and Settings\\madann\\My Documents\\access.log', 'w') access_log = [ [ access_log_stream, WEBrick::AccessLog::COMBINED_LOG_FORMAT ] ] DocumentRoot = 'C:\\Documents and Settings\\madann\\My Documents\\Public_html\\'; HTTPPort = 8008 begin d = Dir.open(DocumentRoot) rescue puts "Creating Documentroot" mkdir DocumentRoot end class DownloadHandler < WEBrick::HTTPServlet::AbstractServlet def do_get(req,resp) p "req : ",req p "resp : ",resp end def go_post(req,resp) resp end end s = WEBrick::HTTPServer.new( :Port => HTTPPort, :DocumentRoot => DocumentRoot, :FancyIndexing => true #:Logger => WEBrick::Log.new('download.log'), #:AccessLog => access_log ) s.mount("/cgi-bin", WEBrick::HTTPServlet::FileHandler, "C:\\Documents and Settings\\madann\\My Documents\\Public_html\\cgi-bin\\", {:FancyIndexing=>true}) trap("INT"){ s.shutdown } s.start
$ tracd --port 8000 /path/to/projectenv