Skip to content

Instantly share code, notes, and snippets.

View titanous's full-sized avatar

Jonathan Rudenberg titanous

View GitHub Profile
// Copyright 2020 Google LLC.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Derived from https://github.com/salrashid123/oauth2/blob/4342bfaf8491f79fce4c951dff55384ad1f90f1f/google/impersonate.go
package impersonate
import (
"context"
"encoding/json"
@titanous
titanous / # macvim - 2017-09-25_15-22-02.txt
Created September 25, 2017 19:27
macvim on macOS 10.12.6 - Homebrew build logs
Homebrew build logs for macvim on macOS 10.12.6
Build date: 2017-09-25 15:22:02
{
"ALL": {
"name": "All",
"requests": {
"all": {
"rejected": 47718,
"total": 149708,
"need_more_info": 16896,
"pending": 5027,
"complied": 59935
@titanous
titanous / build.rb
Last active August 29, 2015 14:11 — forked from anatol/build.rb
#!/usr/bin/ruby
# directory git should contain 2 branches: origin/master and debian
system("rm -rf debian && mkdir debian")
Dir.chdir('git')
system('git remote update && git reset --hard origin/master')
version = `git describe`.chomp
// ==UserScript==
// @name Declutter Twitter
// @namespace https://titanous.com
// @description Removes "Who To Follow", "Trends" and the legalese/footer
// @include http://twitter.com/*
// @include http://www.twitter.com/*
// @include https://twitter.com/*
// @include https://www.twitter.com/*
// @grant none
// ==/UserScript==
WARNING: DATA RACE
Write by goroutine 30:
github.com/coreos/etcd/server.(*raftServerStats).RecvAppendReq()
/Users/titanous/src/gopkgs/src/github.com/coreos/etcd/src/github.com/coreos/etcd/server/raft_server_stats.go:46 +0x3a
github.com/coreos/etcd/server.(*PeerServer).AppendEntriesHttpHandler()
/Users/titanous/src/gopkgs/src/github.com/coreos/etcd/src/github.com/coreos/etcd/server/peer_server_handlers.go:66 +0x485
github.com/coreos/etcd/server.*PeerServer.AppendEntriesHttpHandler·fm()
/Users/titanous/src/gopkgs/src/github.com/coreos/etcd/src/github.com/coreos/etcd/server/peer_server.go:245 +0x51
net/http.HandlerFunc.ServeHTTP()
/Users/titanous/src/go-tip/src/pkg/net/http/server.go:1222 +0x4d

Keybase proof

I hereby claim:

  • I am titanous on github.
  • I am titanous (https://keybase.io/titanous) on keybase.
  • I have a public key whose fingerprint is 6834 13C4 A7A6 1C6D 84D6 8A7C E38D 8C6B AA8C 49AA

To claim this, I am signing this object:

package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"crypto/x509/pkix"
"encoding/pem"
"fmt"
"math"
package main
import (
"fmt"
"os"
"github.com/titanous/goamz/aws"
"github.com/titanous/goamz/s3"
)
@titanous
titanous / json.go
Last active December 19, 2015 05:39
Pretty JSON syntax errors in Go
package main
import (
"bytes"
"encoding/json"
"io"
"strconv"
)
type JSONSyntaxError struct {