Skip to content

Instantly share code, notes, and snippets.

View caridy's full-sized avatar

Caridy Patiño caridy

  • Salesforce, Inc.
  • Miami, FL.
  • X @caridy
View GitHub Profile
<!doctype html>
<html>
<head>
<title>Event Binder - Simple</title>
</head>
<body>
<div id="doc">
<div id="democlick">
<!doctype html>
<html>
<head>
<title>Event Binder Evolution</title>
</head>
<body>
<div id="doc">
<div id="democlick">
@caridy
caridy / event-binder-markup.html
Created October 27, 2010 22:04
event-binder-regular-listener
<!DOCTYPE html>
<html>
<head>
<title>fast page</title>
<link rel="stylesheet" type="text/css" href='http://company.cdn.com/combo?
1.2/rollout/app.css'>
</head>
<body class="yui3-skin-sam">
<script>
YUI_config = {
@caridy
caridy / init.js
Created October 29, 2010 19:44
loading-strategy
YUI().use('tabview', function(Y) {
var config = Y.config.app || {};
if (config.tabview) {
new Y.TabView({
srcNode: config.tabview
});
}
});
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>fast page</title>
<link type="text/css" href='http://company.cdn.com/combo?
1.1/rollout/app.css'>
</head>
<body class="yui3-skin-sam">
<script type="text/javascript">
@caridy
caridy / gist:1042783
Created June 23, 2011 15:38
yui vs persistent Y
var http = require('http');
var YUI = require('yui3').YUI;
// persistent Y
var global_Y = YUI({
fetchCSS: false,
useConsoleOutput: false
});
http.createServer(function (req, res) {
@caridy
caridy / digg.js
Created October 31, 2011 15:17 — forked from davglass/digg.js
#!/usr/bin/env node
var YUI = require("yui3").YUI;
YUI({
debug: true
}).use('node', 'io', function(Y) {
//Messing with the main page..
Y.one('title').set('innerHTML', 'Digg News Headlines');
@caridy
caridy / gist:1373730
Created November 17, 2011 16:56
fixing the dynamic iframe's domain to solve the cross domain issue in IE when running in a page with a canonical domain defined.
// This is pure craziness, injecting an iframe in a page that has
// a fixed canonical domain will cause the dynamic iframe to fail
// to access the parent window.
// As a workaround, we can fix the domain in the dynamic iframe for IE.
(function() {
var inject = function(d, w) {
var ie = w.navigator.userAgent.match(/MSIE\s/),
i = d.createElement("iframe"),
n = (ie && (d.domain != d.location.host) ? ("<scri" + "pt>try{document.domain='#d';}catch(e){}</scr" + "ipt>").replace("#d", d.domain) : ""),
f = ("<!doctype html><html><head>" + n + "<sc" + "ript src='#c'></scri" + "pt></head><body></body></html>").replace("#c", "http://your-company.com/your-app-controller.js"),
@caridy
caridy / gist:3836241
Created October 4, 2012 20:31
conditional loading on YUI3
Searching 3859 files for ""condition": {" (case sensitive)
/Users/caridy/repo/yui3/src/app/meta/app.json:
27
28 "app-transitions-native": {
29: "condition": {
30 "trigger": "app-transitions",
31 "test" : "app-transitions-test.js"
/Users/caridy/repo/yui3/src/autocomplete/meta/autocomplete.json:
'autocomplete-plugin':
{ requires: [ 'autocomplete-list', 'node-pluginhost' ],
name: 'autocomplete-plugin',
type: 'js',
path: 'autocomplete-plugin/autocomplete-plugin-min.js',
supersedes: undefined,
ext: false,
_parsed: false,
langCache: undefined,
expanded_map: