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
{ | |
/* Keybindings for emacs emulation. Compiled by Jacob Rus. | |
* | |
* This is a pretty good set, especially considering that many emacs bindings | |
* such as C-o, C-a, C-e, C-k, C-y, C-v, C-f, C-b, C-p, C-n, C-t, and | |
* perhaps a few more, are already built into the system. | |
* | |
* BEWARE: | |
* This file uses the Option key as a meta key. This has the side-effect | |
* of overriding Mac OS keybindings for the option key, which generally |
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
module RuntimeTypes where | |
open import Function | |
open import Data.Unit | |
open import Data.Bool | |
open import Data.Integer | |
open import Data.String as String | |
open import Data.Maybe hiding (All) | |
open import Data.List | |
open import Data.List.All |
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) 2012 The Chromium OS Authors. All rights reserved. | |
# Use of this source code is governed by a BSD-style license that can be | |
# found in the LICENSE file. | |
description "mount CROUTON on /var/crouton" | |
author "drinkcat & DennisLfromGA" | |
start on starting boot-services | |
task | |
script |
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
// Quasiquoted excerpt | |
def cdef = q""" | |
class $ClassName[..$classTypeParams](..$primaryParams) extends ..$classParents { | |
..$primaryAccessors | |
def get = this | |
def isEmpty = ${quasi.isEmpty} | |
def copy(..$primaryWithDefaults) = $ObjectName(..$primaryNames) |
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
(* How do to topology in Coq if you are secretly an HOL fan. | |
We will not use type classes or canonical structures because they | |
count as "advanced" technology. But we will use notations. | |
*) | |
(* We think of subsets as propositional functions. | |
Thus, if [A] is a type [x : A] and [U] is a subset of [A], | |
[U x] means "[x] is an element of [U]". | |
*) | |
Definition P (A : Type) := A -> Prop. |
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
scala> class Bippy | |
defined class Bippy | |
scala> val x = new Bippy | |
x: Bippy = Bippy@4919b727 | |
scala> show"$x" | |
<console>:15: error: type mismatch; | |
found : Bippy | |
required: psp.std.Shown[_] |
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 | |
# | |
# Usage: cat somefile.txt | mkString [sep] | |
# | |
paste -s -d$1 - |
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
[bcrosby@infiniteloop ~]$ traceroute -m255 xmas.futile.net | |
traceroute to xmas.futile.net (77.75.106.106), 255 hops max, 60 byte packets | |
1 router2-nac.linode.com (207.99.1.14) 0.460 ms 0.569 ms 0.693 ms | |
2 207.99.53.45 (207.99.53.45) 0.243 ms 0.254 ms 0.286 ms | |
3 0.e1-1.tbr2.tl9.nac.net (209.123.10.78) 1.278 ms 1.260 ms 1.351 ms | |
4 0.e2-2.pr2.tl9.nac.net (209.123.11.146) 1.252 ms 1.331 ms 1.384 ms | |
5 xe-0-0-0-0.edge00.thn.uk.hso-group.net (195.66.224.226) 79.858 ms 79.847 ms 79.827 ms | |
6 xe-8-3.core00.thn.uk.hso-group.net (93.89.91.15) 83.115 ms 80.668 ms 80.683 ms | |
7 xe-4-4.core00.gs1.uk.hso-group.net (77.75.108.160) 88.337 ms 88.427 ms 86.697 ms | |
8 ae0-1203.edge00.sov.uk.hso-group.net (46.17.60.117) 82.199 ms 82.166 ms 82.122 ms |
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.g. mkString : a b c becomes a:b:c | |
# A single separator argument means the strings to join are on stdin. | |
# | |
# mkString "\n" < /some/file does get the newline | |
# through the obstacle course. | |
mkString () { | |
local sep="$1" |
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
// Define the following traits and companion object | |
// It's in Rapture Core (https://github.com/propensive/rapture-core) if you don't want to | |
trait LowPriorityDefaultsTo { implicit def fallback[T, S]: DefaultsTo[T, S] = null } | |
object DefaultsTo extends LowPriorityDefaultsTo { implicit def defaultDefaultsTo[T]: DefaultsTo[T, T] = null } | |
trait DefaultsTo[T, S] | |
// Then, assuming we want to specify a default for a type class like `Namer`, | |
case class Namer[T](name: String) |