Skip to content

Instantly share code, notes, and snippets.

View emwalker's full-sized avatar

Eric Walker emwalker

  • Bold Penguin
  • Loveland, Colorado
View GitHub Profile
@emwalker
emwalker / gist:ab03961f751021209ae0
Created May 14, 2014 23:16
relevant part of a stack trace ending with a DeadlineExceededError
File "/base/data/home/apps/<snip>/2.375838904101182006/app/bigquery.py", line 112, in _query_result
return job.execute(http=self.http)
File "lib/oauth2client/util.py", line 132, in positional_wrapper
return wrapped(*args, **kwargs)
File "lib/apiclient/http.py", line 716, in execute
body=self.body, headers=self.headers)
File "lib/oauth2client/util.py", line 132, in positional_wrapper
return wrapped(*args, **kwargs)
File "lib/oauth2client/client.py", line 490, in new_request
redirections, connection_type)
defmodule Digraffe.Collection do
use Digraffe.Web, :model
alias Digraffe.Settings
schema "collections" do
field :title, :string
belongs_to :owner, Settings
timestamps
end
@emwalker
emwalker / fissions.txt
Last active July 27, 2016 05:05
Platinum and palladium fission reactions
Platinum
190Pt → 54Cr + 136Xe + 106038 keV
190Pt → 48Ca + 142Ce + 91432 keV
190Pt → 40Ar + 150Nd + 71394 keV
190Pt → 36S + 154Sm + 65794 keV
190Pt → 30Si + 160Gd + 55049 keV
190Pt → 26Mg + 164Dy + 44856 keV
190Pt → 22Ne + 168Er + 33690 keV
192Pt → 22Ne + 170Er + 31842 keV
@emwalker
emwalker / .rubocop.yml
Last active September 12, 2017 20:43
Rubocop rules for block braces
# Space between `method_name` and `{`
# https://rubocop.readthedocs.io/en/latest/cops_layout/#layoutspacebeforeblockbraces
Layout/SpaceBeforeBlockBraces:
EnforcedStyle: space
Exclude:
- 'app/queries/*'
# Space after block `{` and space before `}`
# https://rubocop.readthedocs.io/en/latest/cops_layout/#layoutspacebeforeblockbraces
Layout/SpaceInsideBlockBraces:
@emwalker
emwalker / nested.patch
Created November 14, 2017 19:02
Allow nested execution
commit ca10b17221be21f6ec71138da25059a5611e3eb9
Author: Eric Walker <eric.walker@holacracyone.com>
Date: Tue Nov 14 13:54:08 2017 -0500
Allow nested execution.
diff --git a/lib/graphql/batch.rb b/lib/graphql/batch.rb
index 89b7359..2a3118d 100644
--- a/lib/graphql/batch.rb
+++ b/lib/graphql/batch.rb
@emwalker
emwalker / nesting.patch
Created November 16, 2017 20:29
Allow nested queries
commit 39203ff494701c0445cec1139dbebf981c0b5a38
Author: Eric Walker <eric.walker@holacracyone.com>
Date: Thu Nov 16 15:10:08 2017 -0500
Add GraphQL::Batch::Executor.setup, .teardown.
diff --git a/lib/graphql/batch.rb b/lib/graphql/batch.rb
index 89b7359..ee70f75 100644
--- a/lib/graphql/batch.rb
+++ b/lib/graphql/batch.rb
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: backup-production-database
spec:
schedule: "*/30 * * * *"
jobTemplate:
spec:
template:
@emwalker
emwalker / On a Mac, in Docker:
Created February 25, 2018 19:48
Running the Kubernetes unit tests
This file has been truncated, but you can view the full file.
$ build/run.sh make test > make-test-docker.log 2>&1 ; echo $? (eu-production/production)
1
$ cat make-test-docker.log
+++ [0225 12:28:20] Verifying Prerequisites....
+++ [0225 12:28:21] Using Docker for MacOS
+++ [0225 12:28:22] Building Docker image kube-build:build-bcacb243b9-5-v1.9.3-2
+++ [0225 12:28:25] Keeping container kube-build-bcacb243b9-5-v1.9.3-2
+++ [0225 12:28:25] Keeping container kube-build-data-bcacb243b9-5-v1.9.3-2
+++ [0225 12:28:25] Keeping container glassfrog_rails_1
+++ [0225 12:28:25] Keeping container xenodochial_leakey
@emwalker
emwalker / summary
Created February 26, 2018 14:15
Failing k8s tests
--- FAIL: TestExampleObjectSchemas (0.16s)
examples_test.go:379: Directory ../examples/elasticsearch: Expected 3 examples, Got 0
examples_test.go:352: skipping : ../examples/openshift-origin/secret.json/secret
FAIL
FAIL k8s.io/kubernetes/examples 0.217s
--- FAIL: Example_printPodHideTerminated (0.00s)
got:
NAME READY STATUS RESTARTS AGE
test1 1/2 Pending 6 10y
openssl genrsa -out $username.key 4096
openssl req -new -key $username.key -out $username-csr.pem -subj "/CN=$username" -days 365
echo "Creating a certificate signing request for $username"
cat <<EOF | kubectl create -f -
apiVersion: certificates.k8s.io/v1beta1
kind: CertificateSigningRequest
metadata:
name: $username
spec: