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
| <canvas id="rect" width="440" height="120"></canvas> | |
| <script> | |
| var elem = document.getElementById('rect'); | |
| context = elem.getContext('2d'); | |
| context.fillStyle = "rgb(255,0,0)"; | |
| context.fillRect(20, 20, 220, 120); | |
| </script> |
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
| #shadow { | |
| -moz-box-shadow: | |
| 10px 10px 25px rgba(0, 0, 0, 0.25), | |
| 10px 10px 5px rgba(0, 0, 0, 0.5), | |
| 0 5px 5px -3px black; | |
| -webkit-box-shadow: | |
| 10px 10px 25px rgba(0, 0, 0, 0.25), | |
| 10px 10px 5px rgba(0, 0, 0, 0.5), | |
| 0 5px 5px -3px black; | |
| box-shadow: |
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
| /* | |
| * Copyright (c) 2010 Tobias Schneider | |
| * This script is freely distributable under the terms of the MIT license. | |
| */ | |
| (function(){ | |
| var UPC_SET = { | |
| "3211": '0', | |
| "2221": '1', | |
| "2122": '2', |
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
| Hello {{name}} | |
| You have just won ${{value}}! | |
| {{#in_ca}} | |
| Well, ${{taxed_value}}, after taxes. | |
| {{/in_ca}} |
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
| function render(tweet) { | |
| var html = '<li><div class="tweet">'; | |
| html += '<div class="vcard"><a href="http://twitter.com/' + tweet.user.screen_name + '" class="url"><img style="height: 48px; width: 48px;" alt="' + tweet.user.name + '" class="photo fn" height="48" src="' + tweet.user.profile_image_url + '" width="48" /></a></div>'; | |
| html += '<div class="hentry"><strong><a href="http://twitter.com/'; | |
| html += tweet.user.screen_name + '" '; | |
| html += 'title="' + tweet.user.name + '">' + tweet.user.screen_name + '</a></strong> '; | |
| html += '<span class="entry-content">'; | |
| html += container[twitterlib].ify.clean(tweet.text); | |
| html += '</span> <span class="meta entry-meta"><a href="http://twitter.com/' + tweet.user.screen_name; | |
| html += '/status/' + tweet.id + '" class="entry-date" rel="bookmark"><span class="published" 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
| // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/forEach | |
| if (!Array.prototype.forEach) | |
| { | |
| Array.prototype.forEach = function(fun /*, thisp*/) | |
| { | |
| var len = this.length >>> 0; | |
| if (typeof fun != "function") | |
| throw new TypeError(); |
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
| // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/map | |
| if (!Array.prototype.map) | |
| { | |
| Array.prototype.map = function(fun /*, thisp*/) | |
| { | |
| var len = this.length >>> 0; | |
| if (typeof fun != "function") | |
| throw new TypeError(); |
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
| // FROM: http://stevenlevithan.com/demo/parseuri/js/assets/parseuri.js | |
| // parseUri 1.2.2 | |
| // (c) Steven Levithan <stevenlevithan.com> | |
| // MIT License | |
| function parseUri (str) { | |
| var o = parseUri.options, | |
| m = o.parser[o.strictMode ? "strict" : "loose"].exec(str), | |
| uri = {}, |
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
| var performance = (function () { | |
| var my = {}; | |
| // Wrap a function body in this to return a copy that instruments itself | |
| // If you want this to be useful, you should give your profiled function a name, | |
| // otherwise it will be identified as "", which is less than useful. | |
| my.profile = function (func) { | |
| return function () { | |
| var start = new Date().getTime(), | |
| time, |
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
| // From: http://github.com/wuher/oauth2/blob/master/lib/oauth2.js | |
| /* | |
| * implementation copied from narwhal/lib/uuid.js | |
| * this is because narwhal/engines/rhino/lib/uuid.js overrides this | |
| */ | |
| var CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split(''); | |
| var generate_verifier = function (length, radix) { | |
| var chars = CHARS, uuid = [], rnd = Math.random; | |
| length = length || 8; |