Skip to content

Instantly share code, notes, and snippets.

View camerondavison's full-sized avatar
💭
riding

Cameron Davison camerondavison

💭
riding
View GitHub Profile
#!/usr/bin/env python3
from googleapiclient.discovery import build
from oauth2client.service_account import ServiceAccountCredentials
import structlog
log = structlog.get_logger()
def main():
{"level":"warn","time":"2020-07-14T14:57:59Z","message":"config: cache url will be deprecated in v0.11.0"}
{"level":"info","version":"v0.9.0+a70254a","time":"2020-07-14T14:57:59Z","message":"cmd/pomerium"}
{"level":"info","port":"42743","time":"2020-07-14T14:57:59Z","message":"gRPC server started"}
{"level":"info","port":"38471","time":"2020-07-14T14:57:59Z","message":"HTTP server started"}
{"level":"info","checksum":"fedc237b0fe431bb","time":"2020-07-14T14:57:59Z","message":"authenticate: updating options"}
{"level":"info","host":"authenticate.secure.dev.digitalpharmacist.com","time":"2020-07-14T14:57:59Z","message":"enabled authenticate service"}
{"level":"info","addr":"127.0.0.1:42743","time":"2020-07-14T14:57:59Z","message":"starting control-plane gRPC server"}
{"level":"info","addr":"127.0.0.1:38471","time":"2020-07-14T14:57:59Z","message":"starting control-plane HTTP server"}
{"level":"info","service":"envoy","name":"main","time":"2020-07-14T14:58:00Z","message":"initializing epoch 0 (hot restart versio
{"level":"info","service":"envoy","upstream-cluster":"pomerium-control-plane-http","method":"GET","authority":"10.120.4.21:443","path":"/ping","user-agent":"kube-probe/1.15+","referer":"","forwarded-for":"10.128.0.113","request-id":"6003780d-4434-4562-a2be-c7a282420dfe","duration":1.759108,"size":66,"response-code":200,"response-code-details":"via_upstream","time":"2020-07-13T23:37:44Z","message":"http-request"}
{"level":"info","service":"envoy","upstream-cluster":"pomerium-control-plane-http","method":"GET","authority":"authenticate.secure.dev.digitalpharmacist.com","path":"/.pomerium/?pomerium_redirect_uri=https%3A%2F%2Fhttpbin.secure.dev.digitalpharmacist.com%2F.pomerium%2F","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36","referer":"","forwarded-for":"70.114.218.62,10.120.42.2","request-id":"81647d26-8f61-411f-a6c6-7237566060e4","duration":10.509055,"size":10113,"response-code":200,"response-code-details":"via_upstream
@camerondavison
camerondavison / .babelrc
Last active August 20, 2023 19:42
apache arrow from python to javascript
{
"presets": [
"@babel/preset-env",
]
}

Keybase proof

I hereby claim:

  • I am camerondavison on github.
  • I am camerondavison (https://keybase.io/camerondavison) on keybase.
  • I have a public key whose fingerprint is 2CB0 B927 DCBF CCC9 08C8 F1CC CA82 2219 D90E E18C

To claim this, I am signing this object:

Hide Code Template

cat > /tmp/hidecode.tplx <<EOM
((*- extends 'article.tplx' -*))

((* block input_group *))
    ((*- if cell.metadata.get('nbconvert', {}).get('show_code', False) -*))
        ((( super() )))
    ((*- endif -*))
((* endblock input_group *))
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
OUTER_COUNTER=0
while :; do
COUNTER=0
while [ $COUNTER -lt 10 ]; do
printf "${OUTER_COUNTER}:%-30000s\n" ' ' | tr ' ' "${COUNTER}"
let COUNTER=COUNTER+1
@camerondavison
camerondavison / node-exporter.txt
Last active August 29, 2015 14:21
node_exporter
--
SIGQUIT: quit
PC=0x4425a1
goroutine 0 [idle]:
runtime.futex(0xd0f378, 0x0, 0x0, 0x0, 0x0, 0xd0e720, 0x7ffc00000001, 0x4102cf, 0x4104ee, 0xd0f378, ...)
/usr/local/go/src/runtime/sys_linux_amd64.s:277 +0x21
runtime.futexsleep(0xd0f378, 0xc200000000, 0xffffffffffffffff)
/usr/local/go/src/runtime/os_linux.c:49 +0x47
runtime.notesleep(0xd0f378)
/usr/local/go/src/runtime/lock_futex.go:145 +0xae
final Semaphore s = new Semaphore(10);
final Stopwatch w = Stopwatch.createStarted();
final File t = Files.createTempDir();
try {
for (int i = 0; i < 10000; i++) {
s.acquire();
final RandomAccessFile file = new RandomAccessFile(new File(t, "f" + i + ".txt"), "rw");
file.write("HELLO WORLD".getBytes(Charsets.UTF_8));
file.close();