Skip to content

Instantly share code, notes, and snippets.

@gitgrimbo
gitgrimbo / 00.Linux Commands
Last active February 16, 2019 11:12
Linux Commands
Click to see more
@gitgrimbo
gitgrimbo / 00.Service Worker Tips
Created February 16, 2019 10:59
Service Worker Tips
Click to see more
@gitgrimbo
gitgrimbo / 00.Curl Commands
Created February 16, 2019 10:56
Curl Commands
Click to see more
@gitgrimbo
gitgrimbo / PerformanceTimingCollector.java
Last active May 1, 2018 09:42
BMP/Selenium - Performance Timing Collection
package grimbo.bmp;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.StringWriter;
import java.io.Writer;
import java.math.BigDecimal;
@gitgrimbo
gitgrimbo / set-title.md
Created January 31, 2017 14:14
Utility batch/script files

Sets the cmd window title to the current folder name.

@echo off
set MYDIR=%cd%
set MYDIR1=%MYDIR:~0%

for %%f in (%MYDIR1%) do set MYDIR=%%~nxf
title %MYDIR%
@gitgrimbo
gitgrimbo / demo.md
Created December 8, 2016 19:06
generate keyframe css for 'rotating' letters
@gitgrimbo
gitgrimbo / 00.HAR Viewer
Last active April 30, 2019 11:28
harviewer test cases
Click to see more
@gitgrimbo
gitgrimbo / Copy chrome cookies (from dev tools) into fixed width text.js
Last active March 10, 2023 04:00
Overcome performance.getEntries() limit of 150 resources
/**
* Simple pad string.
*/
function pad(s, len, c, left) {
while (s.length < len) s = (left ? c + s : s + c); return s;
}
/**
* Return columnar data as an array of strings.
* @param {string[][]} rows The rows/cols to format.
@gitgrimbo
gitgrimbo / JS streams.js
Last active August 29, 2015 14:26
JS streams
function intStream(from, to) {
var i = from;
var unbounded = ("number" !== typeof to);
return {
hasNext: function() { return unbounded ? true : (i < to); },
next: function() { if (!this.hasNext()) throw "Stream Finished"; return i++; },
toString: function() {
return "Int Stream: from " + from + ", " + (unbounded ? "unbounded" : "to " + to);
}
};
@gitgrimbo
gitgrimbo / dojo build copy transform perf measurements.md
Last active August 29, 2015 14:25
dojo-util-copy-transform-performance

dojo/util version used is 1.10.4. Custom branches are forked off 1.10.4.

Running a build on this project:

Why are Node and Java results not side-by-side? Because it's hard to isolate the comparison to just the file copy as there are so many other performance differences between the Node and Java builds. So safer to just compare Node to Node and Java to Java.


  • OS: W7 (Windows 7), U1404 (Ubuntu 14.04)