The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: October 8th 2015
- Original post
<meta name="viewport" content="initial-scale=1, width=device-width, user-scalable=no"> |
var Utility = { | |
getBitRate = function(size, duration) { | |
return numberFormat(Math.round((size * 8) / duration)); | |
}, | |
numberFormat = function(x) { | |
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); | |
}, | |
(function($) { | |
var o = $({}); | |
$.each({ | |
trigger: 'publish', | |
on: 'subscribe', | |
off: 'unsubscribe' | |
}, function(key, api) { | |
$[api] = function() { | |
o[key].apply(o, arguments); |
(function($) { | |
var myVar; | |
var setVal = function() { | |
var deferred = $.Deferred(); | |
setTimeout(function() { | |
myVar = 'myValue'; | |
deferred.resolve(); | |
}, 2000); |
// Polyfill for Old Browser | |
if (typeof Object.create !== "function") { | |
Object.create = function(obj) { | |
function F() {}; | |
F.prototype = obj; | |
return new F(); | |
} | |
} | |
// Plugin |
{ | |
"analytics": false, | |
"directory": "resources/assets/vendor" | |
} |
<script> | |
if ('registerElement' in document | |
&& 'createShadowRoot' in HTMLElement.prototype | |
&& 'import' in document.createElement('link') | |
&& 'content' in document.createElement('template')) { | |
// We're using a browser with native WC support! | |
} else { | |
document.write( | |
'<script src="https:\/\/cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/0.6.0/webcomponents.min.js"><\/script>' | |
); |
@extends('layouts.master') | |
@section('content') | |
<div> | |
{{--To correctly styling as we specified, we can use div element instead of code--}} | |
<code data-gist-id="baaa8af6ac065998f417" data-gist-line="1-11" data-gist-highlight-line="1,3,5" {{--data-gist-hide-footer="true"--}} data-gist-show-spinner="true"></code> | |
</div> | |
@stop | |
@section('script') |
sub cgiReadInput { | |
if ($ENV{'REQUEST_METHOD'} eq 'POST') { | |
read(STDIN, $query_string, $ENV{'CONTENT_LENGTH'}); | |
} | |
if ($ENV{'REQUEST_METHOD'} eq 'GET') { | |
$query_string = $ENV{'QUERY_STRING'}; | |
} | |
@pairs = split(/&/, $query_string); |