Skip to content

Instantly share code, notes, and snippets.

View issue-295-triage.go
func TestAccClientIssue295(t *testing.T) {
rand := random.String(6)
resource.Test(t, resource.TestCase{
Providers: map[string]terraform.ResourceProvider{
"auth0": Provider(),
},
Steps: []resource.TestStep{
{
View fleet.go
type FleetVehicle interface {
MakeAndModel() string
}
type Vehicle struct {
Type string `json:"type"`
Make string `json:"make"`
Model string `json:"model"`
}
View json.go
package management
import (
"encoding/json"
)
type S struct {
// The discriminator used to undertsand which concrete type of Option we
// should use to unmarshal into. Can be either [foo, bar].
@alexkappa
alexkappa / json.go
Created Mar 9, 2020
Auth0 Go SDK unmarshal polymorphic structs using discriminator
View json.go
package management
import (
"encoding/json"
"reflect"
)
type S struct {
// The discriminator used to undertsand which concrete type of Option we
@alexkappa
alexkappa / 0. main.tf
Created Dec 11, 2019
terraform-provider-auth0 issue #119
View 0. main.tf
resource "auth0_user" "user" {
connection_name = "Username-Password-Authentication"
username = "rsatesting"
nickname = "rsatesting"
email = "rob+testing@gmail.com"
email_verified = true
password = "IAmAp455w0rd"
app_metadata = "{\"groups\": [\"project:platform-admin\", \"foo:bar\"]}"
}
@alexkappa
alexkappa / error.go
Last active Apr 8, 2019
Auth0 Go SDK Error Type
View error.go
package management
type ErrorType int
const (
UnknownError ErrorType = iota
CannotSetUsernameForConnectionError
PasswordStrengthError
@alexkappa
alexkappa / auth0-cleanup.sh
Created Jun 12, 2018
Auth0 clean-up script
View auth0-cleanup.sh
#!/usr/bin/env bash
AUTH0_DOMAIN=<your-auth0-domain>
AUTH0_TOKEN=<your-auth0-token>
function client_list() {
curl -sS \
-H "Authorization: Bearer $AUTH0_TOKEN" \
"https://$AUTH0_DOMAIN/api/v2/clients?fields=client_id,name&include_fields=true&_=$(date +%s)" |\
jq -r -c -M '.[]'
@alexkappa
alexkappa / intercom.html
Last active Feb 7, 2019
Install Intercom using Google Tag Manager
View intercom.html
<script>
window.intercomSettings = {
app_id: 'APP_ID',
name: "Jane Doe", // Full name
email: "customer@example.com", // Email address
created_at: 1312182000 // Signup date as a Unix timestamp
};
</script>
<script>
(function() {
View journal.log
Mar 14 14:56:56 k8s-node fleetd[785]: ERROR engine.go:217: Engine leadership lost, renewal failed: 101: Compare failed ([34778 != 34780]) [34782]
Mar 14 14:57:00 k8s-node fleetd[785]: ERROR engine.go:217: Engine leadership lost, renewal failed: 101: Compare failed ([34783 != 34785]) [34785]
Mar 14 14:57:04 k8s-node fleetd[785]: ERROR engine.go:217: Engine leadership lost, renewal failed: 101: Compare failed ([34786 != 34788]) [34790]
Mar 14 14:57:08 k8s-node fleetd[785]: ERROR engine.go:217: Engine leadership lost, renewal failed: 101: Compare failed ([34791 != 34793]) [34795]
Mar 14 14:57:12 k8s-node fleetd[785]: ERROR engine.go:217: Engine leadership lost, renewal failed: 101: Compare failed ([34796 != 34799]) [34800]
Mar 14 14:57:15 k8s-node sdnotify-proxy[853]: I0314 14:57:15.351187 00001 vxlan.go:340] Ignoring not a miss: fa:75:0a:94:49:8b, 10.10.30.0
Mar 14 14:57:16 k8s-node fleetd[785]: ERROR engine.go:217: Engine leadership lost, renewal failed: 101: Compare failed ([34801 != 34803]) [34803]
Mar 14 14
View kubelet-master.service
[Unit]
Description=Kubernetes Kubelet
Documentation=http://kubernetes.io/v1.1/
[Service]
ExecStart=/opt/bin/kubelet \
--address=$private_ipv4 \
--allow-privileged=true \
--api-servers=http://127.0.0.1:8080 \
--cadvisor-port=4194 \
--cloud-provider=aws \