Skip to content

Instantly share code, notes, and snippets.

thefrontender / hearts.js
Created Apr 15, 2012
Hearts card game in JS
View hearts.js
Timing and asynchronus events
View css-playing-cards.html
<!doctype html>
<html class="no-js" lang="en">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Card test - 10K Hearts</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
thefrontender / hideaddrbar.js
Created Jan 11, 2012 — forked from scottjehl/hideaddrbar.js
Normalized hide address bar for iOS & Android (JSLint compliant)
View hideaddrbar.js
/*jslint browser: true, indent: 4 */
* Normalized hide address bar for iOS & Android
* (c) Scott Jehl,
* MIT License
(function (win) {
'use strict';
var doc = win.document,
scrollTop = 1,
thefrontender / HTML5-dictate
Created Nov 9, 2011
A quick dictation demo using new Speech, Blobs, Drag n Drog APIs from HTML5. Use latest version of Chrome.
View HTML5-dictate
<!doctype html>
<title>Dictation with HTML5 - Using Speech, Blobs, Drag & Drop APIs</title>
<input id="dictate" type="text" speech x-webkit-speech />
<textarea id="post"></textarea>
<a href="#" id="dragout" draggable="true">Save Text file (drag to desktop)</a>
thefrontender / dealer.js
Created Aug 16, 2011
Javascript Dealer class for card games.
View dealer.js
var Dealer = function (decks, suits, cards) {
var pack = [], // cards yet to be dealt (stock/shoe)
played = 0, // cards already dealt,
// Fisher-Yates shuffle -