Skip to content

Instantly share code, notes, and snippets.

@ekashida
ekashida / index.html
Last active January 4, 2016 21:19
loader performance tests
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>loader performance tests</title>
</head>
<body>
<h1>tests</h1>
<ul>
Y.Model: Instantiate a bare model
┌──────────┬────────────────────────────┬─────────────────────────────┐
│ │ Firefox │ Chrome │
├──────────┼────────────────────────────┼─────────────────────────────┤
│ v3.8.0 │ 3971.37 ±2.80% (-87%) │ 11258.29 ±4.26% (-163%) │
│ v3.9.0 │ 3596.12 ±5.37% (-107%) │ 11661.04 ±3.15% (-154%) │
│ WIP │ 7444.50 ±3.80% (Fastest) │ 29661.83 ±3.30% (Fastest) │
└──────────┴────────────────────────────┴─────────────────────────────┘
Y.Model: Subclass and instantiate a bare model
@ekashida
ekashida / basic-dev-setup.md
Last active December 10, 2015 00:08
Setting up git, node, npm, and a node version manager from scratch
@jed
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active March 8, 2024 02:11
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
// Primary YUI instance for the page
YUI().use('node', function (Y) {
Y.Global.on('fooFrame:message', function (e) {
console.log(e.message);
});
});
// Create another instance for the iframe
YUI({
doc: document.getElementById('foo-frame').documentElement
//detect Internet Explorer and version number through injected conditional comments (no UA detect, no need for cond. compilation / jscript check)
//version arg is for IE version (optional)
//comparison arg supports 'lte', 'gte', etc (optional)
var isIE = (function(undefined){
var doc = document,
doc_elem = doc.documentElement,
cache = {},