Skip to content

Instantly share code, notes, and snippets.

<pack:script enabled="${packTagEnabled}" minify="false" prefix="script-moment-immutable">
<src>/js/alm/builds/bower/moment/2.9.0/<c:if test="${packTagEnabled}">min/</c:if>moment<c:if test="${packTagEnabled}">.min</c:if>.js</src>
<src>/js/alm/builds/bower/moment-timezone/0.3.0/builds/moment-timezone.<c:if test="${packTagEnabled}">min.</c:if>js</src>
<src>/js/alm/builds/bower/immutable/3.6.2/dist/immutable<c:if test="${packTagEnabled}">.min</c:if>.js"></src>
</pack:script>
@pherris
pherris / app.js
Created December 18, 2014 19:21
Node parse HTML file and publish to Flowdock
var htmlparser = require("htmlparser");
var fs = require('fs');
var sys = require("sys");
var _ = require('lodash');
var prettyjson = require('prettyjson');
var express = require('express');
var bodyParser = require('body-parser');
var requestify = require('requestify');
var app = express();
@pherris
pherris / index.html
Last active August 29, 2015 14:07
Continual monitoring of JS latency on the client
<!DOCTYPE html>
<html lang="en">
<head></head>
<body>
<script>
//add logging for client latency (when detected).
//to create client latency, Rally.metrics.wait(250);
document.addEventListener('clientLatency', function (evt) {
console.log('latency!', evt.detail);
}, false);
@pherris
pherris / Component.js
Created October 17, 2014 17:53
Ext Component - log events
(function() {
var Ext = window.Ext4 || window.Ext;
Ext.define('Rally.ui.overrides.Container', {
override: 'Ext.Container',
constructor: function (config) {
if (!config) {
config = {};
}
@pherris
pherris / mutationObserver.html
Last active August 29, 2015 14:07
Ext Element Cache with MutationSummary Library
<!DOCTYPE html>
<html>
<head>
<title>ExtJS Cache Example</title>
<link href="http://cdn.sencha.com/ext/gpl/4.2.0/resources/css/ext-all.css" rel="stylesheet" />
<script src="http://cdn.sencha.com/ext/gpl/4.2.0/ext-all-debug.js"></script>
<body>
</body>
@pherris
pherris / app.js
Created March 24, 2014 17:10
Node app for testing rule forward...
var express = require('express');
var app = express();
app.get('/', function(req, res){
var retryCount = req.query.retryCount;
console.log("req.query.retryCount: " + retryCount);
if (!retryCount || retryCount <3) {
res.send(500, 'retryCount under 3');
} else {
res.send('Hello World' + retryCount);
@pherris
pherris / MergeSorter.js
Created March 5, 2014 04:55
MergeSort example in JavaScript
var MergeSorter = (function () {
var merge = function (arr1, arr2) {
var result = [];
while (arr1.length > 0 && arr2.length > 0) {
if (arr1[0] <= arr2[0]) {
result.push(arr1.shift());
} else {
result.push(arr2.shift());