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 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 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 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 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
<!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 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(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 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
<!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 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 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 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
<link rel="shortcut icon" type="image/x-icon"> | |
<style> | |
title{position:absolute;font:8em/8em Arial;top:50%;left:50%;height:1em;margin:-4em 0 0 -2em;text-shadow: 1px 1px 1px #000} | |
head,title{display:block} | |
p{opacity:.7} | |
</style> | |
<script> | |
function j(a,b){return Array(++b).join(a)} | |
function tick(){ | |
var D=new Date,h=D.getHours(),m=D.getMinutes(),s=D.getSeconds(), |
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
<!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 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
#!/usr/bin/env ruby | |
require 'cgi' | |
lint = `java -jar ~/Applications/jslint4java-1.4.6.jar "$TM_FILEPATH"` | |
lint.gsub!(/^jslint.*?((?:\/[\w\.\-]+)+).*?(\d+).*?(\d+).(.*)$/, '<p><label><a href="txmt://open?url=file://TM_FILEPATH&line=\2">Line \2</a> \3</label>\4</p>') | |
lint.gsub!(/TM_FILEPATH/, ENV['TM_FILEPATH']) | |
print <<HTML | |
<!DOCTYPE html> | |
<html><head><style> | |
label{display:inline-block;width:85px;color:#666} | |
a{color:#000;text-decoration:none;font-weight:bold} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Checkbox</title> | |
<style> | |
input[type=checkbox]{display:none;} | |
input[type=checkbox] + label{ | |
background: #999; | |
height: 32px; | |
width: 32px; |