This file contains hidden or 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 | |
| set -e | |
| ################################################################################ | |
| # Usage: $SCRIPT_NAME <neighbors-cmd> < roots | |
| # | |
| # neighbors-cmd: command that takes a node name as argument and outputs its neighbors | |
| # roots: initial nodes read from stdin (one per line) | |
| ################################################################################ |
This file contains hidden or 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 groovy | |
| ztoc = { int d, int z -> | |
| if (0 == d) { | |
| return [] | |
| } | |
| if (1 == d) { | |
| return [z] | |
| } |
This file contains hidden or 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 groovy | |
| import groovy.transform.* | |
| import java.util.concurrent.atomic.* | |
| @Immutable(knownImmutableClasses = [InetSocketAddress]) | |
| class Peer { | |
| private static final SELF_HOSTS = (InetAddress.getAllByName('localhost') as List | |
| + InetAddress.localHost |
This file contains hidden or 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
| (defmacro linas-> | |
| "Similar to clojure.core/as->; returns a vector of intermediate values." | |
| [expr name & forms] | |
| (let [linn `lin#] | |
| `(let [~name ~expr | |
| ~linn [~name] | |
| ~@(interleave (repeat name) (butlast forms) (repeat linn) (repeat `(conj ~linn ~name)))] | |
| ~(if (empty? forms) | |
| [name] | |
| `(conj ~linn ~(last forms)))))) |
This file contains hidden or 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
| 0x00 There once was a coder named Jax | |
| 0x20 Who wrote his programs in Emacs. | |
| 0x40 The heap overflowed? | |
| 0x60 His "elegant" code | |
| 0x80 Was chock-full of realloc hacks! |
This file contains hidden or 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
| Get-NetAdapter | Where-Object {$_.InterfaceDescription -Match "Cisco AnyConnect"} | Set-NetIPInterface -InterfaceMetric 4000 | |
| Get-NetIPInterface -InterfaceAlias "vEthernet (WSL)" | Set-NetIPInterface -InterfaceMetric 1 |
This file contains hidden or 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
| package com.columnzero.util.function; | |
| import io.vavr.Function1; | |
| import io.vavr.PartialFunction; | |
| import io.vavr.collection.Seq; | |
| import io.vavr.collection.Stream; | |
| import lombok.AllArgsConstructor; | |
| import lombok.NonNull; | |
| import java.util.function.Predicate; |
This file contains hidden or 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 groovy.transform.Canonical | |
| import groovy.transform.CompileStatic | |
| interface Type {} | |
| @CompileStatic | |
| @Canonical | |
| class Ref implements Type { | |
| String name | |
| Type type |
This file contains hidden or 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
| // biz/props.gradle | |
| project.ext.fullName = 'biz baz' |
This file contains hidden or 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
| /* | |
| * Usage: | |
| * all LaTeX source files go in $rawDirectory | |
| * base document to 'cook' should match content of $latexFile | |
| * build script delivers resulting PDF file to $cookedDirectory | |
| */ | |
| defaultTasks 'full' | |
| ext { documentBase = 'myBaseLaTeXFileName' } |
NewerOlder