This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>CSS drop-shadows without images</title> | |
<style> | |
body { | |
padding:20px 0 30px; | |
font:14px/1.5 Arial, sans-serif; | |
text-align:center; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$i=0; | |
while($c = $db->getNextSet(true)): | |
print '<li class="'.($i++%2==0 ? 'odd' : 'even').'">Zebras yo!</li>'; | |
endwhile; | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -nc -nH -E -r -k -P /home/you/example.com -np http://example.com/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$bad = array_merge(array_map('chr', range(0,31)), array("<", ">", ":", '"', "/", "\\", "|", "?", "*", " ")); | |
$result = str_replace($bad, "-", $filename); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* No Image Options: | |
* 404 - do not load any image if none is associated with the email hash, instead return an HTTP 404 (File Not Found) response | |
* mm - (mystery-man) Simple, cartoon-style silhouetted outline of a person | |
* identicon - Geometric pattern based on an email hash | |
* monsterid - Generated 'monster' with different colors, faces, etc | |
* wavatar - Fenerated faces with differing features and backgrounds | |
* retro - 8-bit arcade-style pixelated faces |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function seoName($title) { | |
return preg_replace('/[^a-z0-9_-]/i', '', strtolower(str_replace(' ', '-', trim($title)))); | |
} | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! jQuery.scrollstick (c) 2012, Rico Sta. Cruz. MIT License. | |
* https://github.com/rstacruz/jquery-stuff/tree/master/scrollstick */ | |
// Makes something stick to the top when it gets scrolled away from. | |
// | |
// $("#nav").scrollstick(); | |
// | |
// You may also specify options: | |
// | |
// $("#nav").scrollstick({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="javascript:(function(){ document.body.innerHTML += "<img src='http://i.imgur.com/UhYgGxG.gif' style='display:block; position:fixed; bottom:-10px; left:50%; width:320px; height:407px; margin-left:-160px; z-index:9999;'>"; })();">Dancing Cat!</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$sports = 'https://news.google.com/news/feeds?ned=us&topic=s&output=rss'; | |
$feedCache = 'feed.xml'; | |
if(!file_exists($feedCache)): | |
fopen($feedCache, 'w'); | |
$saveSports = file_get_contents($sports); | |
$saveSports = file_put_contents($feedCache, $saveSports); | |
elseif((time() - filemtime($feedCache)) > 3600): | |
$saveSports = file_get_contents($sports); | |
$saveSports = file_put_contents($feedCache, $saveSports); |
OlderNewer