Skip to content

Instantly share code, notes, and snippets.

Avatar

Eric Ferraiuolo ericf

View GitHub Profile
View gist:9255584
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.4.2/pure-min.css">
</head>
<body>
<div class="pure-g">
@ericf
ericf / CSP + SPDY Push.md
Last active Aug 29, 2015
CSP + SPDY Push
View CSP + SPDY Push.md

SPDY Push for Externalizing Dynamic Inline Scripts for CSP

This is a rough outline of some thoughts on how to leverage [SPDY Push][SPDY] externalize inline <script>s that contain dynamic, page/user-specific configuration and state data to align with [CSP][].

Problem

We are building web apps where the initial rendering (HTML) is built server-side, and in order for the client-side JavaScript app to take over, the app's configuration and initial state are written to an inline <script> element.

View gist:53406
YUI().use("node", "compat", function(Y){
Y.Lang.isValue( YAHOO && YAHOO.util.Dom && YAHOO.util.Event ) // true
});
View test.html
<html>
<head><title>testing gist</title></head>
<body>
<script type="text/javascript" src="http://gist.github.com/raw/68197/0599a2f57e5626b606a35bd0e65136da2e1742f0/test.js"></script>
<script type="text/javascript" src="http://gist.github.com/raw/68197/49951505cda6e4d30c49ffd387f0e4464a2bb437/test2.js"></script>
</body>
View gist:76385
var lis = Y.all('#test li'), index = 0;
lis.each(function(li){
Y.log( index );
Y.log( lis.item(index).compareTo(li) ); // true
index ++;
});
View gist:153853
/**
* SimpleTabs
* Eric Ferraiuolo — http://eric.ferraiuolo.name
*/
var SimpleTabs,
SIMPLETABS = 'simpletabs',
BOUNDING_BOX = 'boundingBox',
CONTENT_BOX = 'contentBox',
View gist:199914
/**
* Overlay Modal Extension
*
* Oddnut Software
* Copyright (c) 2009 Eric Ferraiuolo - http://eric.ferraiuolo.name
* MIT License - http://www.opensource.org/licenses/mit-license.php
*/
var Modal,
View gist:209358
YUI.add('overlay-modal', function(Y) {
/**
* Overlay Modal Extension
*
* Oddnut Software
* Copyright (c) 2009 Eric Ferraiuolo - http://eric.ferraiuolo.name
* MIT License - http://www.opensource.org/licenses/mit-license.php
*/
View gist:209363
YUI().use('overlay', 'overlay-modal', function(Y){
var FancyOverlay = Y.Base.build('fancyoverlay', Y.Overlay, [Y.OverlayModal]);
var myFancyOverlay = new FancyOverlay({
modal : true,
mask : true,
centered : true,
width : 500
height : 300
View logismo.js
YUI.add('logismo', function(Y) {
/**
* Logismo
*/
var Logismo,
LOGISMO = 'logismo',
EVENTS_RESOURCE_PATH = 'eventsResourcePath',
You can’t perform that action at this time.