This gist has been upgraded to a blog post here.
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/env bash | |
# | |
# Given a scalac command line which produces a stack trace, such as | |
# <this program> some-scalac crasher.scala | |
# Tracks down a scala git repository if it can; parses the stack trace | |
# for files and line numbers; and outputs -3 lines to +3 lines for | |
# each line in the stack trace, as the file was at the time of the commit. | |
MaxFrames=10 |
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
# Copyright (c) 2016 The crouton Authors. All rights reserved. | |
# Use of this source code is governed by a BSD-style license that can be | |
# found in the LICENSE file. | |
## Filename: /etc/init/crouton.conf | |
## NOTE: 'rootfs' verification needs to be removed. | |
## crouton chroot - Start session | |
## | |
## This will start a (crouton) chroot Desktop Environment session |
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
#!/bin/sh -e | |
##!! PLEASE USE THIS SCRIPT WITH CAUTION - AND AT YOUR OWN RISK !!## | |
##!! IT HAS BEEN KNOWN TO CAUSE RESETS AND WIPE DATA ON SOME CHROMEBOXES !!## | |
APPLICATION="${0##*/}" | |
ANSWER='' | |
SUDO='' | |
USAGE=" | |
$APPLICATION [no options] |
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
#!/bin/sh | |
inPreprocessorMode () { | |
hasE=0 | |
hasU=0 | |
hasT=0 | |
for arg in "$@" | |
do | |
if [ 'x-E' = "x$arg" ]; then hasE=1; fi | |
if [ 'x-undef' = "x$arg" ]; then hasU=1; fi |
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
From 8ab91751069e391a95151c6716a546b1732ade92 Mon Sep 17 00:00:00 2001 | |
From: JP <twitter:canoeberry> | |
Date: Sun, 19 Jan 2014 11:58:54 +0000 | |
Subject: [PATCH] partial memleak fix | |
This patch was created by JP (twitter: @canoeberry) based on a memleak fix by Dirk (emacs committer) below: | |
https://github.com/mirrors/emacs/commit/57ae6509a3b6a274f89b9caea0284c6156470625 | |
This memory leak is fixed in the trunk as of now and will be in the next official release: 24.4. |
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
object Nats { | |
sealed trait Nat { | |
type Prev <: Nat { type Succ = Nat.this.type } | |
type Succ <: Nat { type Prev = Nat.this.type } | |
} | |
object Zero extends Nat | |
type _0 = Zero.type | |
type _1 = _0#Succ | |
type _2 = _1#Succ |
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 language.higherKinds | |
object Tagged { | |
type @@[A, B] = { type T = A } | |
type Id[A] = A | |
implicit class Taggable[A](a: A) { | |
def tagged[B]: A @@ B = a.asInstanceOf[A @@ B] | |
} |
The philosophy behind Documentation-Driven Development is a simple: from the perspective of a user, if a feature is not documented, then it doesn't exist, and if a feature is documented incorrectly, then it's broken.
- Document the feature first. Figure out how you're going to describe the feature to users; if it's not documented, it doesn't exist. Documentation is the best way to define a feature in a user's eyes.
- Whenever possible, documentation should be reviewed by users (community or Spark Elite) before any development begins.
- Once documentation has been written, development should commence, and test-driven development is preferred.
- Unit tests should be written that test the features as described by the documentation. If the functionality ever comes out of alignment with the documentation, tests should fail.
- When a feature is being modified, it should be modified documentation-first.
- When documentation is modified, so should be the tests.