Skip to content

Instantly share code, notes, and snippets.

class Protobuf < Formula
desc "Protocol buffers (Google's data interchange format)"
homepage "https://github.com/google/protobuf/"
url "https://github.com/google/protobuf/archive/v3.0.2.tar.gz"
sha256 "b700647e11556b643ccddffd1f41d8cb7704ed02090af54cc517d44d912d11c1"
head "https://github.com/google/protobuf.git"
bottle do
sha256 "12622b355f2f487ce7bad94d23fda69f1137a59f61a61d9b2839b64033f42334" => :sierra
sha256 "6e4be33dfd56f5a1434bd0922e5b488031cfc5d6ce599812034d3c1b855c4fe1" => :el_capitan
@roboll
roboll / airport-dns
Created October 18, 2016 17:57
Set DNS servers for airport express.
#! /bin/bash
set -eo pipefail
dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
provider="$1"
case "$provider" in
google)
server_one="8.8.8.8"
server_two="8.8.4.4"
@roboll
roboll / Setup GitHub issue labels script
Created March 31, 2016 15:10 — forked from adamreisnz/Setup GitHub issue labels script
A terminal script to setup GitHub issue labels for a project.
Setup GitHub issue labels script

Redirecting A Vanity Import

Using a vanity import path allows repositories to migrate between providers seamlessly without modifications to consumer code.

go get (since 1.4) has support for determining the actual location of vcs repositories given a canonical import path via inclusion of a html meta tag in the response of the canonical location. The canonical import path must correspond with an actual http(s) endpoint, responding with a html document including a meta tag containing the canonical import path, vcs repository type [git|bzr|hg], and the actual location.

For example, a repository github.com/example/myproject may be served from example.org/myproject, by including the following snippet in the http response for https://example.org/myproject?go-get=1.

<!-- redirect `go get` to github -->

Keybase proof

I hereby claim:

  • I am roboll on github.
  • I am roboll (https://keybase.io/roboll) on keybase.
  • I have a public key ASCdrTAqhkfTYj5yWOA9zPwlp2g8yFSHFQaLYwqGhu16MQo

To claim this, I am signing this object:

@roboll
roboll / -
Created November 6, 2015 15:13
/ # time apk add --update make
fetch http://dl-4.alpinelinux.org/alpine/v3.2/main/x86_64/APKINDEX.tar.gz
(1/1) Installing make (4.1-r0)
Executing busybox-1.23.2-r0.trigger
OK: 6 MiB in 16 packages
real 0m 2.28s
user 0m 0.09s
sys 0m 0.00s
import sbt._
import Keys._
object MigrationsPlugin extends Plugin {
object Keys {
lazy val Migration = config("migrations")
lazy val migrate = InputKey[Unit]("migrate", "Perform database migrations")
}