Skip to content

Instantly share code, notes, and snippets.

View jonlundy's full-sized avatar
🚀
Awesome

Jon Lundy jonlundy

🚀
Awesome
View GitHub Profile
@jonlundy
jonlundy / openpgp.md
Last active October 14, 2020 15:38
openpgp.md
BEGIN MESSAGE.
uJ8DXfmr36V11EZ k9tzY4B50237Jug BKh0BWUZCTHDr8V owqDS7gi2Hz4pNa
qFPcgCY0lDIinDt muOsNw4RPiJTCKq 6Xr2MZHgg6IxbdG L2ee86kdR7Tzwef
P9YIF3KxsQ8ImAs 5iGVN1u4b5lGth1 IfGYfmdvHXUSmUe Qoi3PrHR4zbwunP
jwJyLdZTvBOpi0w ErjY4bMdvR3ql1y PK8Xd0Qz5Z.
END MESSAGE.
package gql
import (
"bytes"
"database/sql/driver"
"fmt"
"io"
"strings"
"time"
)
schema: schema.graphql
exec:
filename: internal/graph/generated.go
package: graph
model:
filename: pkg/model/generated.go
package: model
models:
ID:
model: sour.is/x/example/pkg/model.Uint
package model
import (
"bytes"
"database/sql/driver"
"fmt"
"io"
"strings"
"time"
)
@jonlundy
jonlundy / generated interfaces
Last active July 20, 2018 19:43
mutation resolvers
type Resolvers interface {
CollectionOps_Section(ctx context.Context, obj *CollectionOps, id string) (*SectionOps, error)
CollectionOps_addSection(ctx context.Context, obj *CollectionOps, name string) (*Section, error)
CollectionOps_removeSection(ctx context.Context, obj *CollectionOps, id string) (*bool, error)
Mutation_Collection(ctx context.Context, id string) (*CollectionOps, error)
Query_Collection(ctx context.Context, id string) (*Collection, error)
SectionOps_addTag(ctx context.Context, obj *SectionOps, value string) (*Tag, error)
SectionOps_removeTag(ctx context.Context, obj *SectionOps, value string) (*bool, error)
}
type Foo {
id: ID!
name: String!
}
type Query {
foo(id: ID!): Foo!
}
@jonlundy
jonlundy / openpgp.txt
Created December 23, 2016 00:40
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:20ae2f310a74ea7cec3ae69f8b3b0604f164e04f]

Keybase proof

I hereby claim:

  • I am jonlundy on github.
  • I am xuu (https://keybase.io/xuu) on keybase.
  • I have a public key whose fingerprint is 8049 CC70 162B BE19 D5B5 180A E24B 23DE 8837 DD3D

To claim this, I am signing this object:

@jonlundy
jonlundy / conv.py
Last active February 15, 2024 00:12
#!/usr/bin/python
# SPDX-License-Identifier: MIT
import sys,json,base64,binascii
with open(sys.argv[1]) as fp:
pkey=json.load(fp)
def enc(data):
missing_padding = 4 - len(data) % 4
if missing_padding: