Skip to content

Instantly share code, notes, and snippets.

View sunfmin's full-sized avatar

Felix Sun sunfmin

View GitHub Profile
VAULT_ADDR=https://vault.theplant.dev vault login -method=oidc role=staff
VAULT_ADDR=https://vault.theplant.dev vault write -field=signed_key ssh-client-signer/sign/dev public_key=@$HOME/.ssh/id_rsa.pub > ~/.ssh/id_rsa-cert.pub -<< EOH
{
"valid_principals": "ubuntu,dev"
}
EOH
ssh-keygen -Lf ~/.ssh/id_rsa-cert.pub
@sunfmin
sunfmin / keybase.md
Created June 17, 2019 03:55
keybase.md

Keybase proof

I hereby claim:

  • I am sunfmin on github.
  • I am sunfmin (https://keybase.io/sunfmin) on keybase.
  • I have a public key ASCPdjjdDjkIUXsPKZA1OOhErY7Qj_EPZQcdPj-flYA9VAo

To claim this, I am signing this object:

"""Autogenerated input type of AcceptTopicSuggestion"""
input AcceptTopicSuggestionInput {
"""The Node ID of the repository."""
repositoryId: ID!
"""The name of the suggested topic."""
name: String!
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
import { test, assertEqual } from "https://deno.land/x/testing/mod.ts";
test(function t1() {
assertEqual("hello", "hello");
});
test(function t2() {
assertEqual("world", "world");
});
**/*.gohtml {
prep: go generate ./aigleapp
}
**/*.go {
prep: go install ./aigleapp
daemon: aigleapp
daemon +sighup: devd -om -n 1000 http://localhost:4000
}
@{
var l *Locale
}
<span>@l.T("for"</span>
{{func (h *HelloData) MyEmail()}}
<em>My Email is: {{h.Email}}</em>
{{end}}
func Hello(w io.Writer, d *HelloData) (err error) {
_, err = io.WriteString(w, "<h1>")
if err != nil {
return
}
_, err = io.WriteString(w, fmt.Sprintf("Hi, %s", d.Name))
if err != nil {
return
}
{{func Hello(d *HelloData)}}
<h1>{{fmt.Sprintf("Hi, %s", d.Name)}} {{d.MyEmail()}}</h1>
<ul>
{{ for _, e := range d.Entries }}
<li>{{EntryItem(e, d.Lang)}}</li>
{{ end }}
</ul>
{{end}}
package templates
import (
"fmt"
"io"
)
type HelloData struct {
Name string
Email string