Skip to content

Instantly share code, notes, and snippets.

View jsoref's full-sized avatar
📕
Saving the word one project at a time

Josh Soref jsoref

📕
Saving the word one project at a time
View GitHub Profile
@jsoref
jsoref / journal-first-restart-of-postgres12
Created February 13, 2020 19:10
pdns will die when postgres restarts
pdns_server[8776]: Backend reported permanent error which prevented lookup (GSQLBackend lookup query:Fatal error during query: SELECT content,ttl,prio,type,domain_id,disabled::int,name,auth::int FROM records WHERE disabled=false and name=$1 and domain_id=$2: FATAL: terminating connection due to administrator command
pdns_server[8776]: server closed the connection unexpectedly
pdns_server[8776]: This probably means the server terminated abnormally
pdns_server[8776]: before or while processing the request.
pdns_server[8776]: ), aborting
pdns_server[8776]: gpgsql Connection failed: Unable to connect to database, connect string: dbname=pdns user=pdns host=localhost password=<HIDDEN>: could not connect to server: Connection refused
pdns_server[8776]: Is the server running on host "localhost" (::1) and accepting
pdns_server[8776]: TCP/IP connections on port 5432?
pdns_server[8776]: could not connect to server: Connection refused
pdns_server[8776]: Is the server running on ho
@jsoref
jsoref / urls-a1.txt
Last active April 27, 2020 17:45
llvm strings
https://github.com/llvm/llvm-project/search?q=abbrevation
https://github.com/llvm/llvm-project/search?q=abiguous
https://github.com/llvm/llvm-project/search?q=abnormaly
https://github.com/llvm/llvm-project/search?q=absense
https://github.com/llvm/llvm-project/search?q=absolete
https://github.com/llvm/llvm-project/search?q=absoulte
https://github.com/llvm/llvm-project/search?q=absoute
https://github.com/llvm/llvm-project/search?q=abstact
https://github.com/llvm/llvm-project/search?q=abstraciton
https://github.com/llvm/llvm-project/search?q=abstruct
source projects/some-project/locations/global/keyRings/default-keyring/cryptoKeys/some-key/cryptoKeyVersions/1 has value DESTROYED in field crypto_key_version.state., failedPrecondition
2020/08/17 16:10:44 [ERROR] <root>: eval: *terraform.EvalSequence, err: googleapi: Error 400: The request cannot be fulfilled. Resource projects/some-project/locations/global/keyRings/default-keyring/cryptoKeys/some-key/cryptoKeyVersions/1 has value DESTROYED in field crypto_key_version.state., failedPrecondition
2020/08/17 16:10:44 [ERROR] <root>: eval: *terraform.EvalOpFilter, err: googleapi: Error 400: The request cannot be fulfilled. Resource projects/some-project/locations/global/keyRings/default-keyring/cryptoKeys/some-key/cryptoKeyVersions/1 has value DESTROYED in field crypto_key_version.state., failedPrecondition
2020-08-17T16:10:44.428-0400 [DEBUG] plugin.terraform-provider-google_v3.27.0_x5: 2020/08/17 16:10:44 [DEBUG] Google API Response Details:
2020-08-17T16:10:44.428-0400 [DEBUG] plugin.terraform-provider-google
$ terraform apply
2020/08/17 18:45:08 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
Use TF_LOG=TRACE to see Terraform's internal logs.
----
2020/08/17 18:45:08 [INFO] Terraform version: 0.13.0
2020/08/17 18:45:08 [INFO] Go runtime version: go1.14.2
2020/08/17 18:45:08 [INFO] CLI args: []string{"/home/jsoref/pristine-bay-286722/terraform", "apply"}
2020/08/17 18:45:08 [DEBUG] Attempting to open CLI config file: /home/jsoref/.terraformrc
2020/08/17 18:45:08 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/08/17 18:45:08 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2020/08/18 18:17:16 [INFO] Terraform version: 0.13.0
2020/08/18 18:17:16 [INFO] Go runtime version: go1.14.2
2020/08/18 18:17:16 [INFO] CLI args: []string{"./terraform", "plan"}
2020/08/18 18:17:16 [DEBUG] Attempting to open CLI config file: /home/jsoref/.terraformrc
2020/08/18 18:17:16 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/08/18 18:17:16 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2020/08/18 18:17:16 [DEBUG] ignoring non-existing provider search directory /home/jsoref/.terraform.d/plugins
2020/08/18 18:17:16 [DEBUG] ignoring non-existing provider search directory /home/jsoref/.local/share/terraform/plugins
2020/08/18 18:17:16 [DEBUG] ignoring non-existing provider search directory /usr/local/share/terraform/plugins
2020/08/18 18:17:16 [DEBUG] ignoring non-existing provider search directory /usr/share/terraform/plugins
$ TF_LOG=trace ./terraform apply
2020/08/19 18:30:12 [INFO] Terraform version: 0.13.0
2020/08/19 18:30:12 [INFO] Go runtime version: go1.14.2
2020/08/19 18:30:12 [INFO] CLI args: []string{"/home/jsoref/pristine-bay-286722/terraform", "apply"}
2020/08/19 18:30:12 [DEBUG] Attempting to open CLI config file: /home/jsoref/.terraformrc
2020/08/19 18:30:12 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/08/19 18:30:12 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2020/08/19 18:30:12 [DEBUG] ignoring non-existing provider search directory /home/jsoref/.terraform.d/plugins
2020/08/19 18:30:12 [DEBUG] ignoring non-existing provider search directory /home/jsoref/.local/share/terraform/plugins
2020/08/19 18:30:12 [DEBUG] ignoring non-existing provider search directory /usr/local/share/terraform/plugins
@jsoref
jsoref / gist:6115a4ce35488ecc6797ec3cb79563b4
Created October 12, 2020 02:49
knative reconciler `determin`
knative/networking/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/reconciler_reconciler.go: // string into a distinct namespace and name, determine if this instance of
knative/networking/pkg/client/injection/reconciler/networking/v1alpha1/certificate/reconciler.go: // string into a distinct namespace and name, determine if this instance of
knative/networking/pkg/client/injection/reconciler/networking/v1alpha1/ingress/reconciler.go: // string into a distinct namespace and name, determine if this instance of
knative/networking/pkg/client/injection/reconciler/networking/v1alpha1/domain/reconciler.go: // string into a distinct namespace and name, determine if this instance of
knative/networking/pkg/client/injection/reconciler/networking/v1alpha1/serverlessservice/reconciler.go: // string into a distinct namespace and name, determine if this instance of
knative/networking/pkg/client/injection/reconciler/networking/v1alpha1/realm/reconciler.go: // string into a distinct namespace
@jsoref
jsoref / neo4j.backup.log
Created December 29, 2021 21:10
neo4j backup failed FileLockException - This file is locked by another process, please ensure you don't have another Neo4j process or tool using it: '/backups/graph-db.backup/neostore'.
2021-12-25 14:22:46.911+0000 INFO [o.n.b.i.BackupOutputMonitor] Start receiving store files
2021-12-25 14:22:46.914+0000 INFO [o.n.b.i.BackupOutputMonitor] Start receiving store file /backups/graph-db.backup/neostore.nodestore.db.labels
2021-12-25 14:22:46.923+0000 INFO [o.n.b.i.BackupOutputMonitor] Finish receiving store file /backups/graph-db.backup/neostore.nodestore.db.labels
2021-12-25 14:22:46.924+0000 INFO [o.n.b.i.BackupOutputMonitor] Start receiving store file /backups/graph-db.backup/neostore.nodestore.db
2021-12-25 14:22:47.718+0000 INFO [o.n.b.i.BackupOutputMonitor] Finish receiving store file /backups/graph-db.backup/neostore.nodestore.db
2021-12-25 14:22:47.718+0000 INFO [o.n.b.i.BackupOutputMonitor] Start receiving store file /backups/graph-db.backup/neostore.propertystore.db.index.keys
2021-12-25 14:22:47.725+0000 INFO [o.n.b.i.BackupOutputMonitor] Finish receiving store file /backups/graph-db.backup/neostore.propertystore.db.index.keys
2021-12-25 14:22:47.725+0000 INFO [o.n.b.i.BackupOutputMo
#!/bin/sh
api_sources=$(mktemp)
echo localhost:8001/api/v1 >> $api_sources
extra_apis=$(mktemp)
export api_prefix=localhost:8001/apis/
curl -sq $api_prefix > $extra_apis
jq -r '.groups[].preferredVersion.groupVersion' $extra_apis | perl -pne 's{^}{$ENV{api_prefix}}' >> $api_sources
apis=$(mktemp)
(
for api in $(cat $api_sources); do
@jsoref
jsoref / zfs-sync-to-remote.sh
Created August 30, 2022 23:25
Sync a bunch of zfs volumes to a remote (designed to be called from a cron-like system)
#!/bin/bash
##
# https://gist.githubusercontent.com/ertug/1087896/raw/0ff791dce616993f8557bf74e1f47cebb4b69aae/zfs-snapshot.sh
# original code: http://andyleonard.com/2010/04/07/automatic-zfs-snapshot-rotation-on-freebsd/
# 07/17/2011 - ertug: made it compatible with zfs-fuse which doesn't have .zfs directories
##
# Path to ZFS executable:
ZFS=/sbin/zfs