.htaccess redirect
// insert code here..
12309 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
// insert code here..
# error docs ErrorDocument 404 /error404.php
<h1>Page not found</h1> <?php /* Error 404 code for ***** website */ $webmaster = "webmaster@camrider.com"; $host = getenv("REMOTE_HOST"); $referrer = getenv("HTTP_REFERER"); $path = getenv("REQUEST_URI"); // time in this format: 13/Nov/2000:10:50:38 $time = strftime("%d/%b/%Y:%T"); if ($referrer == "") { $referrer = ""; } else { $referrer = "<p>You came to this page from $referrer, this could be a broken link so please <a href=\"mailto:$webmaster?subject=Error 404 on $path from $referrer\">email the webmaster</a> to inform us of this.</p>"; } ?> <h2>Sorry, we couldn't find the page <?php echo $path ?> on this website</h2> <?php echo $referrer; ?> <p>Please use the navigation links to help locate what you're looking for.</p>
mencoder ~/Desktop/wpa90_220k.rm -o ~/Desktop/wpa90_23.avi -ovc lavc -oac lavc -ss 00:41:10 -endpos 00:01:20 mencoder ~/Desktop/wpa90_23.avi -o ~/Desktop/wpa90_232.avi -ovc xvid -xvidencopts bitrate=400 -oac lavc -lavcopts acodec=mp3
export movie 1 to save_location as hinted movie using default settings
create tar file tar cvf filename.tar monkey.txt monkey2.txt add a file tar uvf filename.tar monkey.txt extract tar file tar xvf filename.tar list contents tar tf monkey.tar
import re string = 'riché' print string riché richre = re.compile('([A-z]+)') match = richre.match(string) print match.groups() ('rich',) richre = re.compile('(\w+)',re.LOCALE) match = richre.match(string) print match.groups() ('rich',) richre = re.compile('([é\w]+)') match = richre.match(string) print match.groups() ('rich\xe9',) richre = re.compile('([\xe9\w]+)') match = richre.match(string) print match.groups() ('rich\xe9',) richre = re.compile('([\xe9-\xf8\w]+)') match = richre.match(string) print match.groups() ('rich\xe9',) string = 'richéñ' match = richre.match(string) print match.groups() ('rich\xe9\xf1',) richre = re.compile('([\u00E9-\u00F8\w]+)') print match.groups() ('rich\xe9\xf1',) matched = match.group(1) print matched richéñ
SELECT * FROM tags PROCEDURE ANALYSE()
EXPLAIN SELECT t2.dbid, t2.tag, COUNT(t2.dbid) * 20 AS match_count FROM tags AS t1, tags AS t2 WHERE t1.dbid = '105318' AND t2.tag = t1.tag AND t1.dbid != t2.dbid GROUP BY t2.dbid ORDER BY match_count;
select t2.dbid, t2.tag, count(t2.dbid) as match_count from tags as t1, tags as t2 where t1.dbid = '105319' and t2.tag = t1.tag and t1.dbid != t2.dbid GROUP BY t2.dbid 1 ORDER BY match_count;