Skip to content

Instantly share code, notes, and snippets.

View dabrahams's full-sized avatar
🤩
STLabbin’

Dave Abrahams dabrahams

🤩
STLabbin’
View GitHub Profile
@dabrahams
dabrahams / git-bisect.log
Created March 24, 2014 11:57
git bisect log output for performance problem with magit-rewrite-finish. In skipped commits the feature was non-functional. In bad commits, it was just slow.
# bad: [a8b60a98942934c995f70982b2f66a3f6d50f86e] magit-run*: better return values
# good: [fddbf000ad8db97f72e522a274e148d2e18299b2] Merge branch 'pr/fix-ediff-and-visit-item'
git bisect start 'refs/tags/BADDY' 'refs/tags/GOODY'
# good: [6e8d7ae94e9fe6b3adfc45e0c3bcffcd46f01038] magit-stgit-rebase: show message when done
git bisect good 6e8d7ae94e9fe6b3adfc45e0c3bcffcd46f01038
# good: [8a7eafcf3dc377450cd52dca652814421e02ab80] magit-diff-range: new function (kludge)
git bisect good 8a7eafcf3dc377450cd52dca652814421e02ab80
# bad: [d9d70450717487f33c3bbf39552cf4544dd0d65f] magit-process-set-mode-line: absorb utility function
git bisect bad d9d70450717487f33c3bbf39552cf4544dd0d65f
# skip: [9298fa5dedea9286f7a2ff2393bcfc741b3b0974] Merge branch 'pr/maint'
@dabrahams
dabrahams / ListAsCollection.swift
Last active August 29, 2015 14:10
Demonstrate List<T> as a Collection
// A simple singly-linked list node.
class Node<T> {
init(_ x: T, next: Node? = nil) {
value = x
self.next = next
}
let value: T
let next: Node?
}
@dabrahams
dabrahams / pig.csv
Last active August 29, 2015 14:14
Simulated game of PIG
Rolls/turn Average number turns to reach 100 points
1 23.72269
2 17.74129
3 17.35628
4 18.90145
5 21.03683
6 26.10675
7 30.22107
8 33.02424
9 38.78141
f2d166293a73eadb31930087b7476490d07bca33
. COMMIT_EDITMSG description HEAD info ORIG_HEAD
.. COMMIT_EDITMSG~ FETCH_HEAD hooks logs rebase-merge
branches config gitk.cache index objects refs
Rebasing master onto 8b27d6f
11312dd8d801daf4c3300c46586ce0b41b31228b
repo: /home/dave/src/techarcana/.git
history scope: HEAD
Help
Common Key Bindings:
n:next thing p:previous thing /:search history s:show repo's status g:redisplay q:quit
Extra Key Bindings for a Commit line:
SPC:load details h:hide/show details H:hide sub-blocks o:checkout b:start new branch
* commit 11312dd8d801daf4c3300c46586ce0b41b31228b
| Author: David Abrahams <dave@boostpro.com>
| Date: Sun Jan 4 17:38:09 2009 -0500
|
| Move some global configuration into config.d/
|
* commit 8b27d6fa8588f7df23b169a70225a57fa29ead01
| Author: David Abrahams <dave@boostpro.com>
| Date: Sun Jan 4 14:22:13 2009 -0500
|
// Copyright David Abrahams 2009. Distributed under the Boost
// Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
unsigned count;
unsigned zero; // used to prevent dead code elimination and static analysis. see main
struct counter
{
~counter() { ++count; }
# Copyright David Abrahams 2009. Distributed under the Boost
# Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
import os
import sys
def compile(depth, throw=False, catch=False, exception_spec=False, eh_enabled=True):
print 'compiling...',
sys.stdout.flush()
THROW = throw and '-DTHROW' or ''
# Copyright David Abrahams 2009. Distributed under the Boost
# Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
import os
import sys
def compile(depth, throw=False, catch=False, exception_spec=False, eh_enabled=True):
print 'compiling...',
sys.stdout.flush()
THROW = throw and '-DTHROW' or ''
# pkg history -l
Operation: purge-history
Outcome: Succeeded
Client: pkg
Version: 02ad3f8f9c38
User: root (0)
Start Time: 2009-04-20T11:17:43
End Time: 2009-04-20T11:17:43
Command: /usr/bin/pkg -R /export/home/dc/build_data/pkg_image purge-history
Start State: