install a spell-checking program
;spell-checking (setq-default ispell-program-name "/Program Files/Aspell/bin/aspell.exe")
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!)
What next?
1. Bookmark us with del.icio.us or Digg Us!
2. Subscribe to this site's RSS feed
3. Browse the site.
4. Post your own code snippets to the site!
;spell-checking (setq-default ispell-program-name "/Program Files/Aspell/bin/aspell.exe")
package MyPackage; #module code goes here... 1;
#! /usr/bin/perl -w use strict; use HTTP::Request::Common; use LWP::UserAgent; #The Perl Black Book, Holzner, p. 1247 =item how to call submit_query(): #Method 1. my %example = (test1 => 'noah', test2 => 'sussman'); submit_query("http://suburbanangst.com/reg.php", %example); #Method 2. submit_query("http://suburbanangst.com/reg.php?test1=foo&test2=bar;"); =cut sub submit_query { my ($file, %query) = @_; my $user_agent = LWP::UserAgent->new; $user_agent->agent("MSIE/5.5 " . $user_agent->agent); my $request = POST #'http://suburbanangst.com/reg.php', $file, [%query]; my $response = $user_agent->request($request); print $response->as_string; }
//assuming that 'menu' has an appropriate onclick handler: function simulateClick( itemToClick, menu) { if ( ! itemToClick.click ) { //== Non-IE: menu.onclick({target: itemToClick}); } else { //== IE: itemToClick.click() } }
<div id="yahooHeader"> <a href="#" class="yahooBranch">Yahoo!</a> <ul> <li><a href="#" title="Home">Home</a> - </li> <li><a href="#" title="Help">Help</a></li> </ul> </div><!-- close yahooHeader -->
<?php $content = <<<HTML Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi in sapien interdum purus volutpat placerat. Sed ornare nisi eu magna. Cras vulputate. Phasellus vel lorem vel magna placerat iaculis. Aenean tortor leo, ultricies ut, dictum non, blandit nec, odio. Morbi vel odio. Etiam venenatis turpis suscipit nibh. Suspendisse tincidunt, metus vel consequat gravida, neque enim egestas est, et interdum diam tellus vel lorem. In hac habitasse platea dictumst. Fusce vitae velit. Suspendisse a libero et risus imperdiet tincidunt. HTML; $html = <<<HTML <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>title</title> <link rel="stylesheet" href="./css/screen.css" type="text/css" media="screen" /> </head> <body> <div id="wrap"> $content </div> </body> </html> HTML; echo $html; ?>
<div id="searchbar"> <form action="http://domain.com/search" method="get"> <input type="text" name="q" value="Search Our Site" size="20" maxlength="120" id="searchInput" onfocus="if(this.value == 'Search Our Site'){this.value='';}"> <input type="hidden" name="site" value="externalSearch"> <input type="hidden" name="client" value="externalSearch"> <input type="hidden" name="restrict" value="wwwexternal"> <input type="hidden" name="proxystylesheet" value="http://domain.com/searchStyle.xslt"> <input type="hidden" name="output" value="xml_no_dtd"> <input type="submit" name="btnG" value="Search" id="searchSubmit"> </form> </div>
perl -e "$i=0;while($i<1000){sleep 1; open(WGET,qq/|xargs lynx -dump/);printf WGET qq{http://www.google.com/search?q=site:onemorebug.com&hl=en&start=$i&sa=N},$i+=10}" | grep "\/\/[^/]*onemorebug.com\/"
<?php $filename = $_GET['filename']; // Modify this line to indicate the location of the files you want people to be able to download // This path must not contain a trailing slash. ie. /temp/files/download $download_path = "ficheros/"; // Make sure we can't download files above the current directory location. if(eregi("\.\.", $filename)) die("I'm sorry, you may not download that file."); $file = str_replace("..", "", $filename); // Make sure we can't download .ht control files. if(eregi("\.ht.+", $filename)) die("I'm sorry, you may not download that file."); // Combine the download path and the filename to create the full path to the file. $file = "$download_path$file"; // Test to ensure that the file exists. if(!file_exists($file)) die("I'm sorry, the file doesn't seem to exist."); // Extract the type of file which will be sent to the browser as a header $type = filetype($file); // Get a date and timestamp $today = date("F j, Y, g:i a"); $time = time(); // Send file headers header("Content-type: $type"); header("Content-Disposition: attachment;filename=$filename"); header("Content-Transfer-Encoding: binary"); header('Pragma: no-cache'); header('Expires: 0'); // Send the file contents. set_time_limit(0); readfile($file); ?>
<!DOCTYPE HTML> <html lang="en-US"> <head> <meta charset="UTF-8"> <title>Tuts</title> <style> body { width: 500px; margin: 50px auto; } .box { position: relative; -webkit-box-shadow: 1px 2px 4px rgba(0,0,0,.5); -moz-box-shadow: 1px 2px 4px rgba(0,0,0,.5); box-shadow: 1px 2px 4px rgba(0,0,0,.5); /* Kokakify */ padding: 10px; background: white; } .box img { max-width: 100%; border: 1px inset #8a4419; } .box:after { content: ''; -webkit-box-shadow: 100px 0 10px 20px rgba(0,0,0,.2); -moz-box-shadow: 100px 0 10px 20px rgba(0,0,0,.2); box-shadow: 100px 0 10px 20px rgba(0,0,0,.2); position: absolute; width: 50%; height: 40px; bottom: 20px; right: 90px; z-index: -1; -webkit-transform: skew(-40deg); -moz-transform: skew(-40deg); transform: skew(-40deg); } </style> </head> <body> <div class="box"> <img src="tuts.jpg" alt="Tuts" /> </div> </body> </html>