Skip to content

Instantly share code, notes, and snippets.

@aroben
aroben / flaky_in_page.txt
Created July 15, 2011 15:33 — forked from anonymous/flaky_in_page.txt
flaky test display mock
Possibly Flaky Tests
fast/text/midword-break-before-surrogate-pair.html
r12363 (30012) (results.html): pretty diff
r12359 (30010) (results.html): pretty diff
r12350 (30007) (results.html): pretty diff
Existing bugs related to this test:
* [Bug 25341] This test is horrible!
File new bug for this flaky test
@aroben
aroben / fixit.patch
Created June 12, 2012 17:02
Fix gitignore spaces parsing in libgit2
diff --git a/src/ignore.c b/src/ignore.c
index fc6194b..f2d08f5 100644
--- a/src/ignore.c
+++ b/src/ignore.c
@@ -28,6 +28,8 @@ static int parse_ignore_file(
GITERR_CHECK_ALLOC(match);
}
+ match->flags = GIT_ATTR_FNMATCH_ALLOWSPACE;
+
// Note: Some Emscripten settings will significantly limit the speed of the generated code.
// Note: Some Emscripten settings may limit the speed of the generated code.
// TODO: " u s e s t r i c t ";
try {
this['Module'] = Module;
} catch(e) {
this['Module'] = Module = {};
}
@aroben
aroben / unzip-output.txt
Created February 5, 2013 21:33
Error message when extracting IE7 VMWare VM from modern.ie
$ unzip IE7_Vista.vmwarevm.zip
Archive: IE7_Vista.vmwarevm.zip
warning [IE7_Vista.vmwarevm.zip]: 1384807849 extra bytes at beginning or within zipfile
(attempting to process anyway)
error [IE7_Vista.vmwarevm.zip]: start of central directory not found;
zipfile corrupt.
(please check that you have transferred or created the zipfile in the
appropriate BINARY mode and that you have compiled UnZip properly)
@aroben
aroben / HaystackTarget.cs
Last active December 14, 2015 07:09
How GitHub for Windows sends exceptions to Haystack
using System;
using System.Diagnostics;
using System.Globalization;
using System.Reactive;
using System.Reactive.Linq;
using System.Reflection;
using GitHub.Api;
using GitHub.Extensions;
using GitHub.IO;
using NLog;
@aroben
aroben / list-processes.sh
Created April 5, 2013 12:38
Script to list all processes as they run
while true; do ps aux; done | awk '!/ps aux$/ { if ($2 in pids) { next } else { pids[$2] = 1; print } }'
@aroben
aroben / pstree.ps1
Created May 8, 2013 18:34
Script to print a process tree on Windows
$ProcessesById = @{}
foreach ($Process in (Get-WMIObject -Class Win32_Process)) {
$ProcessesById[$Process.ProcessId] = $Process
}
$ProcessesWithoutParents = @()
$ProcessesByParent = @{}
foreach ($Pair in $ProcessesById.GetEnumerator()) {
$Process = $Pair.Value
@aroben
aroben / netusage.ps1
Last active December 17, 2015 04:19
Script to measure network usage on Windows
$LastLine = ""
while ($true) {
$Bps = Get-WMIObject -Class Win32_PerfFormattedData_Tcpip_NetworkInterface `
| Measure-Object BytesTotalPersec -Sum | %{ $_.Sum }
$ThisLine = "{0:F2} KiB/sec" -f ($Bps / 1024)
[Console]::Write("`r{0}" -f (" " * $LastLine.Length))
[Console]::Write("`r$ThisLine")
@aroben
aroben / README.md
Last active August 29, 2015 13:55
Chromium Infinite Scrolling Demo

This demo comes from Chromium's source repository. See the original here.

The scrollable area represents 500 "virtual" items (kNumberOfItems) using 30 "physical" DOM elements (kPhysicalCount). As elements get scrolled out of view to the top, they get moved down to the bottom via -webkit-transform: translate3d(0, NNNpx, 0) and their contents get replaced with the appropriate "virtual" item. requestAnimationFrame() is used to ensure that updates only happen once per repaint of the window.

@aroben
aroben / deleters.js
Last active August 29, 2015 14:04
Find who has deleted more code than they've added; run on https://github.com/rails/rails/graphs/contributors or similar
$.makeArray($('.capped-card')).map(function(e) {
return [$(e).find('.aname').text(), parseInt($(e).find('.a').text().replace(/,/g, ''), 10), parseInt($(e).find('.d').text().replace(/,/g, ''), 10)];
}).filter(function(a) {
return a[2] > a[1];
}).map(function(a) {
return [a[0], a[2] - a[1], a[2] / a[1]];
}).sort(function(a, b) {
return b[1] - a[1];
}).map(function(a) {
return a[0] + " removed " + a[1] + " lines (" + a[2].toFixed(2) + "x as many lines as they added)";