Skip to content

Instantly share code, notes, and snippets.

@zombiezen
zombiezen / .profile
Last active November 15, 2023 07:34
zsh on Google Cloud Shell
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@zombiezen
zombiezen / Dockerfile
Created June 5, 2017 15:39
dep Container Builder image recipe
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@zombiezen
zombiezen / google-fluentd.conf
Created April 7, 2017 22:30
journald to Stackdriver fluentd config
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@zombiezen
zombiezen / github-issue-csv.go
Last active February 2, 2017 23:36
GitHub Issue CSV Exporter
// Copyright 2017 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@zombiezen
zombiezen / testparams.bash
Created December 24, 2016 06:33
Weird bash parameter expansion test behavior
#!/bin/bash
bash --version
# My repro is on GNU bash, version 4.3.30(1)-release (x86_64-pc-linux-gnu)
echo
echo "unset"
test 'foo123' -eq 0 && echo "test: true" || echo "test: false"
[ 'foo123' -eq 0 ] && echo "[: true" || echo "[: false"
[[ 'foo123' -eq 0 ]] && echo "[[: true" || echo "[[: false"
@zombiezen
zombiezen / keybase.md
Created August 19, 2015 23:31
Keybase Proof

Keybase proof

I hereby claim:

  • I am zombiezen on github.
  • I am zombiezen (https://keybase.io/zombiezen) on keybase.
  • I have a public key whose fingerprint is 14DA 18A1 FF5F 0200 1311 8EFF A5FE 67D1 3018 2499

To claim this, I am signing this object:

@zombiezen
zombiezen / 01current.go
Last active August 29, 2015 14:26
go-capnproto call ordering
// RPC implementation of calling a local vat method.
// This is a simplified version of the code in server.go:45.
// go-capnproto doesn't reflect it now, but I was going to make callOnClient serialized.
func (s *server) callOnClient(call *Call) Answer {
// Find the function for the call's method
fn := s.methods.find(call.Method)
// Build a new answer/future.
ans := newServerAnswer()
// Run the implementation in a separate goroutine.