Skip to content

Instantly share code, notes, and snippets.

View tilomitra's full-sized avatar
👋

Tilo Mitra tilomitra

👋
View GitHub Profile
@tilomitra
tilomitra / hold-unit-tests.js
Last active December 23, 2015 11:39
The hold module provides a gesture event, "hold", which fires when a user's finger/mouse stays at the same place for a given period of time. The release module provides a synthetic event, "release", which fires when a user's finger/mouse leaves the screen.
YUI.add('hold-unit-tests', function(Y) {
var HOLD_EVENT = Y.Node.DOM_EVENTS.hold.eventDef,
Assert = Y.Assert,
noop = function() {},
module = Y.one('#event-hold-module'),
submodule1 = Y.one('#event-hold-submodule1'),
submodule2 = Y.one('#event-hold-submodule2'),
HANDLES = {
@tilomitra
tilomitra / 1147-repro.html
Created September 6, 2013 17:07
Repro case for https://github.com/yui/yui3/issues/1147. This file should be run as a test HTML file inside `yui3/src/event-gestures/tests/manual/`
<!doctype html>
<html>
<head>
<title>Repro case for #1147</title>
<style>
#demo {
width: 200px;
}
#demo ul li {
@tilomitra
tilomitra / index.html
Last active December 21, 2015 17:59 — forked from dannyfritz/index.html
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/pure/0.2.1/pure-min.css">
<style>
.pure-g,
.pure-g-r {
font-family: "Bitstream Charter", Tinos, "Droid Sans", "Dejavu Sans", Helvetica, Arial, sans-serif;
}
.pure-g [class *= "pure-u"],
exports.sectionHeading = function (title) {
return Handlebars.helpers.anchor.call(this, "h2", "content-subhead");
};
exports.anchor = function (title, elemType, classes) {
var elem,
anchor = title.toLowerCase()
.replace(/&[^\s;]+;?/g, '') // remove HTML entities
.replace(/[^\s\w\-]+/g, '') // remove all chars except whitespace, word chars, and -
@tilomitra
tilomitra / results.json
Created August 16, 2013 21:21
Win8 YUI Test Results
This file has been truncated, but you can view the full file.
[
{
"name": "App",
"passed": 370,
"failed": 0,
"errors": 0,
"ignored": 0,
"total": 370,
"duration": 8780,
"type": "report",
function detachHandles(subscription, handles) {
- handles || (handles = Y.Object.values(HANDLES));
+ handles = handles || Y.Object.values(HANDLES);
Y.Array.each(handles, function (item) {
var handle = subscription[item];
@@ -177,7 +177,9 @@ Y.Event.define(EVT_TAP, {
canceled: false,
eventType: event.type
},
Searching 1087 files for "YUI"
/Applications/MAMP/htdocs/yuilib-css/app.js:
33 min: config.isProduction ? '-min' : '',
34
35: yui : config.yui,
36 typekit: config.typekit
37 });
/Applications/MAMP/htdocs/yuilib-css/npm-debug.log:
@tilomitra
tilomitra / pinch-to-zoom.html
Created March 22, 2013 23:15
very basic pinch-to-zoom using YUI3 and touch events.
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'/>
<meta name="viewport" content = "width = device-width, initial-scale = 2.3, user-scalable = no" />
<title></title>
<script src="http://yui.yahooapis.com/3.9.0/build/yui/yui-min.js"></script>
<style>
#box {
@tilomitra
tilomitra / widget-pointer-unit-test.html
Last active December 15, 2015 03:49
YUI Config for WidgetPointer Unit Tests
<!doctype html>
<html>
<head>
<title>gallery-widget-pointer</title>
<script src="http://yui.yahooapis.com/3.9.0/build/yui/yui-min.js"></script>
<script src="js/tests.js"></script>
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="../../assets/gallery-widget-pointer-core.css">
</head>
@tilomitra
tilomitra / csstable.css
Created March 11, 2013 18:52
csstable with datatable styles built in
/*
* CSS TABLES
* ==========
* Simple CSS for HTML Tables
* Author: tilomitra
*/
/* foundational CSS */
.yui3-table, .yui3-skin-sam .yui3-datatable-table {
/* Remove spacing between table cells (from Normalize.css) */