View find_old_lines.pl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# This script parses Git blame's "porcelain" output format and | |
# ascertains the oldest lines of code seen. | |
# | |
# If you want to perform a custom report, just define your own callback | |
# function and invoke parse_porcelain() with it. | |
# | |
# The expected input format is slightly modified from raw `git blame | |
# -p`. Here is an example script for producing input: |
View Apple Bug Report
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(This is the content of https://bugreport.apple.com/web/?problemID=45648013.) | |
Area: | |
Something not on this list | |
Summary: Calling readdir() from multiple threads apparently acquires a global kernel lock, making directory traversal operations from multiple processes extremely slow as the number of parallel I/O operations increases. | |
Steps to Reproduce: |
View Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
# Create a build and development environment for Firefox. | |
FROM ubuntu:12.10 | |
MAINTAINER Gregory Szorc "gps@mozilla.com" | |
RUN apt-get update |
View import_stdlib.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import __future__ | |
import _bootlocale | |
import _collections_abc | |
import _compat_pickle | |
import _compression | |
import _dummy_thread | |
import _markupbase | |
import _osx_support | |
import _py_abc | |
import _pydecimal |
View pyalloc.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This Source Code Form is subject to the terms of the Mozilla Public | |
// License, v. 2.0. If a copy of the MPL was not distributed with this | |
// file, You can obtain one at https://mozilla.org/MPL/2.0/. | |
use libc::{c_void, size_t}; | |
use std::alloc; | |
use std::collections::HashMap; | |
use std::ptr::null_mut; | |
const MIN_ALIGN: usize = 16; |
View gist:598fd7d8323f35eb970f34d07013e3d2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def reposetup(ui, repo): | |
class extrarepo(repo.__class__): | |
def commit(self, self, text="", user=None, date=None, match=None, force=False, | |
editor=False, extra=None): | |
extra = extra or {} | |
# modify extra | |
return super(extrarepo, self).commit(text=text, user=user, ...) | |
repo.__class__ = extrarepo |
View kern.bad
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abi.vsyscall32 = 1 | |
debug.exception-trace = 1 | |
debug.kprobes-optimization = 1 | |
dev.cdrom.autoclose = 1 | |
dev.cdrom.autoeject = 0 | |
dev.cdrom.check_media = 0 | |
dev.cdrom.debug = 0 | |
dev.cdrom.info = CD-ROM information, Id: cdrom.c 3.20 2003/12/17 | |
dev.cdrom.info = | |
dev.cdrom.info = drive name: |
View pending.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import collections | |
import datetime | |
import operator | |
import requests | |
r = requests.get('http://builddata.pub.build.mozilla.org/builddata/buildjson/builds-pending.js') | |
pending = r.json()['pending'] | |
by_tree = collections.Counter() |
View gantt.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Automation Job Scheduling</title> | |
</head> | |
<body> | |
<script type="application/javascript;version=1.8"> | |
// Perform a Treeherder API request and obtain the JSON. | |
function thRequest(path) { |
View github-events.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gzip | |
import json | |
import sys | |
with gzip.GzipFile(sys.args[1], mode='r') as fh: | |
line = fh.readline() | |
if not line: | |
break | |
data = json.loads(line) |
NewerOlder