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> | |
<title>iPad device motion test</title> | |
<style>body,input,button{font-size:20px;}.thing{width:100px;height:100px;background-color:#ccc;position:absolute;top:360px;left:360px;}</style> | |
<script> | |
var x,y,z,thing1,thing2; | |
var accTrackObj = function(options){ | |
var acc={}, | |
accHistory=[{},{}], |
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
var Morse={ | |
toM:{ A:"._",B:"_...",C:"_._.",D:"_..",E:".",F:".._.",G:"__.",H:"....",I:"..",J:".___",K:"_._",L:"._..",M:"__",N:"_.",O:"___",P:".__.",Q:"__._",R:"._.",S:"...",T:"_",U:".._",V:"..._",W:".__",X:"_.._",Y:"_.__",Z:"__..","1":".____","2":"..___","3":"...__","4":"...._","5":".....","6":"_....","7":"__...","8":"___..","9":"____.","0":"_____","/":"_.._.","+":"._._.","=":"_..._",".":"._._._",",":"__..__","?":"..__..","(":"_.__.",")":"_.__._","_":"_...._","\"":"._.._.","_":"..__._","'":".____.",":":"___...",";":"_._._.","$":"..._.._"," ":" "}, | |
fromM:null, | |
getfromM:function(){ | |
function inverseKeyValueObj(o){var r={},k;for(k in o)r[o[k]]=k;return r} | |
if(!this.fromM){ | |
this.fromM=inverseKeyValueObj(this.toM); | |
this.fromM.space=' '; | |
} | |
return this.fromM; |
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> | |
<title>Mobile Device</title> | |
<script type="text/javascript"> | |
document.addEventListener('touchmove', function(e) {e.preventDefault();}); | |
/* Based loosely on source code from http://dev.opera.com/articles/view/html5-canvas-painting/ */ | |
function DrawingCanvas (options) { |
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
javascript:(function(e){e.setAttribute("src","http://the-cheat.local:8080/target/target-script-min.js");document.getElementsByTagName("body")[0].appendChild(e);})(document.createElement("script"));void(0); |
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><meta charset="UTF-8"><title>UTF8 + CSS3 snow</title><style> | |
body{font-family:Helvetica,Arial,Sans-Serif;font-size:150px;color:#fff;background:#000} | |
#s{overflow: hidden;position: absolute;width:1400px;height:600px;background:-webkit-linear-gradient(top,#666,#111)} | |
#s div{position:absolute;text-align:center;height:1em;width:1em;line-height:1em;color:transparent;top:-50px;left:0;-webkit-transition:all 10s;-webkit-transform:translate3d(0,0,0) rotate(0);-webkit-transition-timing-function:ease-in} | |
</style><div id=s></div><script>function SF(a){var b=document.createElement("div"),c=b.style;return b.innerHTML=a.c,c.fontSize=a.s+"px",c.left=a.x+"px",c.textShadow="white 0 0 "+a.z+"px",s.appendChild(b),function(){c.setProperty("-webkit-transform","translate3d("+a.vx+"px,600px,0) rotate("+a.r+"deg)")}}function R(a){return~~(10*Math.random()*a)}setInterval(function(){var a=new SF({x:R(140),z:1+R(.5),s:2+R(5),vx:-50+R(10),r:-500+R(100),c:"❆❄✱✶"[R(.4)]});setTimeout(function(){a()},50)},25)</script> |
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
var sowpods = require('./sowpods.js').sowpods; | |
var server = require('http').createServer(function(req,res){ | |
var word=req.url.replace('/',''); | |
var found=(sowpods.indexOf(word)!==-1); | |
res.writeHead(200,{ | |
'Content-Type':'application/json', | |
'Access-Control-Allow-Origin':'*', | |
'Access-Control-Allow-Headers':'X-Requested-With' | |
}); | |
res.end('{"found":'+found+',"word":"'+word+'"}'); |
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
> var Dealer=require("./dealer.js").Dealer; | |
> var d=new Dealer(10); | |
> d.deal(); | |
Person 0: R,I | |
Person 1: C,K | |
Person 2: E,I | |
Person 3: D,T | |
Person 4: L,W | |
Person 5: H,R | |
Person 6: S,A |
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
var tools={ | |
consonants:'BCDFGHJKLMNPQRSTVWXZ', | |
vowels:'AEIOUY' | |
}; | |
var achievements=[ | |
{ | |
name:'Seven Stones', | |
description:'Laid all 7 tiles in one word', | |
fn:function(move){return (move.replace(/\s/g,'').length===7)} | |
}, |
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 dbMiddleware(req, res, next){ | |
db.collection('people', function(err, collection){ | |
if(!err){ | |
collection.find().toArray(function(err, items){ | |
if(!err){ | |
req.db=items; | |
next(); | |
} else next('Sad collection'); | |
}) | |
} else next('Sad DB'); |
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
Visual Studio 11 Ultimate Beta is the comprehensive ALM offering for | |
organizations developing and operating highly scalable software | |
applications and services. | |
Visual Studio 11 Premium Beta offers an integrated ALM solution to | |
bring together stakeholders, users, and software development functions | |
to deliver compelling applications as a unified team. | |
Visual Studio 11 Professional Beta is a unified development experience | |
that enables developers to create multi-tier applications across the |