Skip to content

Instantly share code, notes, and snippets.

func TestAccClientIssue295(t *testing.T) {
rand := random.String(6)
resource.Test(t, resource.TestCase{
Providers: map[string]terraform.ResourceProvider{
"auth0": Provider(),
},
Steps: []resource.TestStep{
{
type FleetVehicle interface {
MakeAndModel() string
}
type Vehicle struct {
Type string `json:"type"`
Make string `json:"make"`
Model string `json:"model"`
}
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 March 9, 2020 13:24
Auth0 Go SDK unmarshal polymorphic structs using discriminator
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 December 11, 2019 16:46
terraform-provider-auth0 issue #119
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 April 8, 2019 15:18
Auth0 Go SDK Error Type
package management
type ErrorType int
const (
UnknownError ErrorType = iota
CannotSetUsernameForConnectionError
PasswordStrengthError
@alexkappa
alexkappa / auth0-cleanup.sh
Created June 12, 2018 14:02
Auth0 clean-up script
#!/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 February 7, 2019 03:35
Install Intercom using Google Tag Manager
<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() {
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
[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 \