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
| http://jsfiddle.net/GuQaV/show/ |
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
| ' Usage: strip-utf8-bom.vbs file.csv | |
| ' Notes: | |
| ' this isn't suitable for large files unless you have a lot of memory - ADODB.Stream reads the entire file into | |
| ' memory, then builds the output buffer in memory as well. #stupid | |
| If WScript.Arguments.Count <> 1 Then | |
| WScript.Echo "Usage: strip-utf8-bom.vbs file.csv" | |
| WScript.Quit | |
| End If |
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
| javascript:(function(){if (!document.getElementById('someuniqueid')){var objHead = document.getElementsByTagName('head'); if (objHead[0]){if (document.createElementNS && objHead[0].tagName == 'head') var objCSS = objHead[0].appendChild(document.createElementNS('http://www.w3.org/1999/xhtml', 'link')); else var objCSS = objHead[0].appendChild(document.createElement('link')); objCSS.id = 'someuniqueid'; objCSS.rel = 'stylesheet'; objCSS.href = 'data:text/css,*{-webkit-transform-style:preserve-3d;-webkit-transition:-webkit-transform 1s ease-in-out,box-shadow 1s ease-in-out,outline 1s ease-in-out}*:hover{background:rgba(255,255,255,.25);outline:1px solid rgba(0,0,0,.25);-webkit-transform:translateZ(100px);box-shadow:0 0 10px #cacaca}html{-webkit-transition:-webkit-transform 1s ease-in-out}html:hover{-webkit-transform:perspective(800px) rotateY(10deg) translateZ(-700px)}body{height:100%}'; objCSS.type = 'text/css';}}})() |
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
| // requires raf.js (polyfil) | |
| (function(){ | |
| var ids = {}; | |
| function requestId(){ | |
| var id; | |
| do { | |
| id = Math.floor(Math.random() * 1E9); | |
| } while (id in ids); |
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
| // polyfill window.getMatchedCSSRules() in FireFox 6+ | |
| if ( typeof window.getMatchedCSSRules !== 'function' ) { | |
| var ELEMENT_RE = /[\w-]+/g, | |
| ID_RE = /#[\w-]+/g, | |
| CLASS_RE = /\.[\w-]+/g, | |
| ATTR_RE = /\[[^\]]+\]/g, | |
| // :not() pseudo-class does not add to specificity, but its content does as if it was outside it | |
| PSEUDO_CLASSES_RE = /\:(?!not)[\w-]+(\(.*\))?/g, | |
| PSEUDO_ELEMENTS_RE = /\:\:?(after|before|first-letter|first-line|selection)/g; | |
| // convert an array-like object to array |
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 SaveSplash() { | |
| window.msWriteProfilerMark("start-render"); | |
| var body = document.body, | |
| appdata = Windows.Storage.ApplicationData.current, | |
| localfolder = appdata.localFolder, | |
| canvas = document.createElement("canvas"), | |
| ctx = canvas.getContext("2d"), | |
| imgs = document.body.getElementsByTagName("img"), |
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
| package classes { | |
| import com.adobe.csxs.core.CSXSInterface; | |
| import com.adobe.csxs.events.*; | |
| import com.adobe.csxs.external.resources.*; | |
| import com.adobe.csxs.types.*; | |
| import com.adobe.serialization.json.JSON; | |
| import flash.display.Sprite; |
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
| // Uses [request](https://github.com/mikeal/request) | |
| // /?url=http://nodejs.org/logo.png | |
| // /?uri=http://nodejs.org/logo.png | |
| // /?url=http://nodejs.org/logo.png&cb=cbName | |
| // /?url=http://nodejs.org/logo.png&callback=cbName | |
| var fs = require('fs'); | |
| var url = require('url'); | |
| var http = require('http'); | |
| var request = require('request'); |
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 url = 'http://static1.kevincennis.com/sounds/callmemaybe.mp3' | |
| , audio = new Audio(url) | |
| , context = new webkitAudioContext() | |
| // 512 samples per frame, stereo input, mono output | |
| , processor = context.createJavaScriptNode(512, 2, 1) | |
| , sourceNode | |
| audio.addEventListener('canplaythrough', function(){ | |
| sourceNode = context.createMediaElementSource(audio) | |
| sourceNode.connect(processor) |