Skip to content

Instantly share code, notes, and snippets.

@ekashida
ekashida / index.html
Last active December 16, 2015 23:30
[echo/status/404] Checking if the onload and onerror events fire for link tags on Android 2.3.4
<!doctype html>
<head>
<style>
#good,
#bad {
font-size: 30px;
width: 300px;
height:150px;
}
</style>
<!doctype html>
<html>
<head>
<meta charset="utf8">
<title>JSON</title>
</head>
<body>
<h1>JSON Test Page</h1>
@ekashida
ekashida / gist:5273963
Last active December 15, 2015 14:19 — forked from derek/gist:5273783

Welcome to YUI Weekly, the weekly roundup of news and announcements from the YUI team and community. If you have any interesting demos or links you’d like to share, feel free to leave a comment below.

  • This week saw the release of [YUI 3.9.1][1], a patch release that includes bug fixes and enhancements for [Handlebars][2], [LazyModelList][3] fixes, and [Y.Tree][4]. Details of all changes can be found in the [YUI 3.9.1 History Rollup][5].

  • With the 3.9 release out the door, planning for the next release of YUI is underway! One big thing you can expect to see in the upcoming preview release is Satyen Desai's work on Base performance improvements. By including [these updates][6], we're seeing a 2-5x improvements in the [base-benchmark][7] perf tests in Chrome/OSX. Improvements in Base will affect anything extending it, which includes many parts of the library. Stay tuned!

  • For those anxious to get started with the new Y.Promise component, documentation is on the way! Here's the [pull request][8

@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
@ekashida
ekashida / trello-poller.js
Created November 2, 2012 17:11
trello progress poller for google drive spreadsheets
/*global UrlFetchApp:true,Utilities:true,SpreadsheetApp:true*/
var KEY = <API_KEY>,
TOKEN = <TOKEN>,
BOARD = <BOARD_ID>,
BLACKLIST_RE = /stories/i; // list column names to ignore using regex alternation
function trelloFetch(request) {
'use strict';
var url = 'https://api.trello.com/1/' + request + '?key=' + KEY + '&token=' + TOKEN,
@ekashida
ekashida / fiddle.css
Created May 15, 2012 22:51
app creation/deletion without cl
iframe {
display: block;
}
@ekashida
ekashida / funkyclosure.js
Created May 20, 2011 19:37 — forked from andrewvc/funkyclosure.js
from node-streamlogger.js
for (var logLevel in this.levelList) {
this[logLevel] = (function(logLevel) {
return function (message,callback) {
this.logAtLevel(message, this.levelList[logLevel], callback);
}
})(logLevel);
}
});
From 40254b255250d5b889699eb655c8d30c00d322a3 Mon Sep 17 00:00:00 2001
From: Tim Caswell <tim@creationix.com>
Date: Thu, 19 Aug 2010 18:58:28 -0700
Subject: [PATCH] Make process.nextTick worlds faster for large queues.
---
src/node.js | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/node.js b/src/node.js
@ekashida
ekashida / gist:983495
Created May 20, 2011 18:29
Execute a collection of tasks in parallel and wait for all of them to finish before executing the callback
function doAll(collection, callback) {
var left = collection.length;
collection.forEach(function(fun) {
fun(function() {
if (--left == 0) callback();
});
});
};
var result = [];
@ekashida
ekashida / How to be a cafe terrorist (Mac version)
Created April 7, 2011 18:11
Many cafes limit wifi usage by keeping track of your MAC address. To get around this limitation, simply spoof your MAC address every time your session expires.
# create the following symlink if the airport command in the next step cannot be found
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport
# disconnect your machine from the wireless network without turning off airport
sudo airport -z
# spoof a mac address on your wireless interface (random hex values work fine)
sudo ifconfig en1 ether 00:1f:5b:ce:0d:e4
# reconnect!