This file contains 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 short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
This file contains 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-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.9.0/build/reset/reset-min.css"> | |
<link rel="stylesheet" type="text/css" href="css/style.css"> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/modernizr/2.5.3/modernizr.min.js"> | |
</head> |
This file contains 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
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"> | |
<input name="amount" type="hidden" value="COMBIEN_CA_COUTE" /> | |
<input name="currency_code" type="hidden" value="EUR" /> | |
<input name="shipping" type="hidden" value="0.00" /> | |
<input name="tax" type="hidden" value="0.00" /> | |
<input name="return" type="hidden" value="URL_DE_SUCCES" /> | |
<input name="cancel_return" type="hidden" value="URL_ANNULATION" /> | |
<input name="notify_url" type="hidden" value="URL_NOTIFICATION_PAIEMENT" /> | |
<input name="cmd" type="hidden" value="_xclick" /> | |
<input name="business" type="hidden" value="IDENTIFIANT_VENDEUR" /> |
This file contains 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
<ul> | |
<?php | |
include_once(ABSPATH.WPINC.'/rss.php'); // path to include script | |
$feed = fetch_rss('http://feeds.feedburner.com/blogowicz'); // specify feed url | |
$items = array_slice($feed->items, 0, 10); | |
?> | |
<?php if (!empty($items)) : ?> | |
<?php foreach ($items as $item) : ?> | |
<li><a href="<?php echo $item['link']; ?>" rel="nofollow"><?php echo $item['title']; ?></a></li> |
This file contains 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
function copyToClipboard(meintext) { | |
if (window.clipboardData) | |
window.clipboardData.setData("Text", meintext); | |
else if (window.netscape) { | |
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); | |
var clip = Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard); | |
if (!clip) | |
return false; | |
var trans = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable); | |
if (!trans) |
This file contains 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 | |
// ***** Declare function that buids the post type | |
function add_post_type($name, $args = array() ) { | |
add_action('init',function() use($name, $args) { | |
// make post type name capitalized | |
$upper = ucwords($name); | |
// make name acceptable |
This file contains 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
<div class="submit-photos padding-top"> | |
<h2>Photos</h2> | |
<label for="upload-image-photo"> | |
<input id="upload-image-photo" type="text" size="36" name="upload-image-photo" value="" /> | |
<input id="upload-image-button-photo" class="upload-image-button" type="button" value="Upload Image" /> | |
<br />Upload a picture of yourself | |
</label> | |
</div> |
This file contains 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
/** | |
Validate an email address. | |
Provide email address (raw input) | |
Returns true if the email address has the email | |
address format and the domain exists. | |
*/ | |
<?php | |
function validEmail($email) | |
{ |
This file contains 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>HTML5 boilerplate—all you really need…</title> | |
<link rel="stylesheet" type="text/css" href="css/style.css" /> | |
<!--[if IE]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
</head> |
This file contains 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> | |
<head> | |
<meta name="description" content="Animated Pacman Using Pure CSS"> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Anmiated Pacman - Pure CSS</title> | |
<style> | |
body { | |
height:100%; |
OlderNewer