Skip to content

Instantly share code, notes, and snippets.

View tilomitra's full-sized avatar
👋

Tilo Mitra tilomitra

👋
View GitHub Profile
// Step 1. global definition
function Map(config) {
this._init(config);
}
Map.prototype = {
_container: null,
_init: function (config) {
this._container = document.getElementById(config.container);
.yui3-overlay-pointing {}
.yui3-overlay-pointer {
position: absolute;
display: block;
width: 0px;
height: 0px;
border-style: solid;
border-width: 10px;
}
.yui3-overlay-pointing-tl > .yui3-widget-stdmod,
@lsmith
lsmith / gist:1097943
Created July 21, 2011 19:07
Make Y.DataTable instantiable, and an extension point for feature extension classes
// Right now, Y.DataTable is only a namespace. But I want to be able to say new Y.DataTable({...});
// We can do it. We have the technology.
// Step 1. Capture all the properties of the Y.DataTable namespace
// Y.merge creates a shallow copy of an object, and since Y.DataTable is just a namespace object,
// this works like a champ. You could now say new Stuff.Base({...}) to create a DataTable.Base
// instance.
var Stuff = Y.merge(Y.DataTable);
// Step 2. Replace the Y.DataTable namespace with a working DataTable.Base subclass
@buritica
buritica / iosd
Created March 29, 2012 18:52
Enable Remote Inspector on Mobile Safari
#!/bin/bash
# Open iPhone Simulator on default location for XCode 4.3 if found
[[ -d /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/ ]] &&
open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app
# Open iPhone Simulator on default location for XCode 4.2 if found
[[ -d /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/ ]] &&
open /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app
@msweeney
msweeney / grids.js
Created July 24, 2012 23:06
Simple Grid class for building layouts
/*
Usage:
var grid = new Grid({
units: [
'1/2',
'1/4',
'1/4'
],
@triptych
triptych / guest.html
Created July 31, 2012 23:41
YUI Communication Layer Demo
<html>
<head>
<script src="http://yui.yahooapis.com/3.6.0pr3/build/yui/yui-min.js"></script>
</head>
<body>
<script>
// As the child application
YUI({
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

Improvements to New YUI Blog Theme

Objective

  • Wrong copyright. Should be: "© 2012 Yahoo! Inc." not: "© 2012 YUI Blog"
  • Search page is unusable: http://cl.ly/IiYS
  • Linen texture should only be at the lowest layer of the design (I don't care that iOS uses it for the notification sheets, they did it wrong :)
  • Home page's heading alignments are off:
@tilomitra
tilomitra / gist:4179224
Created November 30, 2012 22:43
YUI Weekly Nov 30
@lsmith
lsmith / gist:4272500
Created December 12, 2012 23:04
Potential patch for 'tap' synthetic event's notifier custom event to allow e.preventDefault() or e.stopPropagation() to have that effect on the subsequent 'click' event.
notifier.handle.evt.fire = function (e) {
var subs = this._subscribers.concat(this._afters),
args = Y.Array(arguments, 0, true),
i, len, halt;
for (i = 0, len = subs.length; i < len; ++i) {
halt = subs[i].notify(args, this);
// stopImmediatePropagation
if (halt === false || e.stopped > 1) {