http://ln.hixie.ch/?start=1037910467&count=1
http://ln.hixie.ch/?start=1137740632&count=1
<script> | |
// test for localStorage support | |
if(('localStorage' in window) && window['localStorage'] !== null){ | |
var f = document.getElementById('mainform'); | |
// test with PHP if the form was sent (the submit button has the name "sent") | |
<?php if(isset($_POST['sent']))){?> | |
// get the HTML of the form and cache it in the property "state" | |
localStorage.setItem('state',f.innerHTML); |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Hello World!</title> | |
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.css" /> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.5.2.min.js"></script> | |
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.js"></script> | |
</head> | |
<body> |
/* | |
* Updated to use the function-based method described in http://www.phpied.com/social-button-bffs/ | |
* Better handling of scripts without supplied ids. | |
* | |
* N.B. Be sure to include Google Analytics's _gaq and Facebook's fbAsyncInit prior to this function. | |
*/ | |
(function(doc, script) { | |
var js, | |
fjs = doc.getElementsByTagName(script)[0], |
app.use(express.methodOverride()); | |
// ## CORS middleware | |
// | |
// see: http://stackoverflow.com/questions/7067966/how-to-allow-cors-in-express-nodejs | |
var allowCrossDomain = function(req, res, next) { | |
res.header('Access-Control-Allow-Origin', '*'); | |
res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE'); | |
res.header('Access-Control-Allow-Headers', 'Content-Type, Authorization'); | |
var fs = require('fs'); | |
var path = require('path'); | |
function cssIncImages(cssFile) { | |
var imgRegex = /url\s?\(['"]?(.*?)(?=['"]?\))/gi; | |
var css = fs.readFileSync(cssFile, 'utf-8'); | |
while (match = imgRegex.exec(css)) { | |
var imgPath = path.join(path.dirname(cssFile), match[1]); | |
try { | |
var img = fs.readFileSync(imgPath, 'base64'); |
<p>The proposed (but human unreadable) WHATWG syntax:<p> | |
<pre> | |
<img src="[email protected]" alt="" | |
set="[email protected] 600w 200h 1x, | |
[email protected] 600w 200h 2x, | |
face-icon.png 200w 200h"> | |
</pre> | |
<p>The propposed RICG syntax (that WHATWG rejects):</p> |
(function(){ //Self executing, anonymous function | |
//Leave out above if including in already existing script | |
function Swipe(){ | |
var firstX, lastX; | |
function swipeRight(){ | |
/** | |
* Optimize WooCommerce Scripts | |
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages. | |
*/ | |
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); | |
function child_manage_woocommerce_styles() { | |
//remove generator meta tag | |
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); |
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4 |