Skip to content

Instantly share code, notes, and snippets.

Wesley Hearn wshearn

Block or report user

Report or block wshearn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:5a2c7d507f0fe352fb39949ceee04b2a
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQENBFqMds4BCACrMd8dCZ+2V1puUVJ9vg9lN0ufwkS3RdZheoU8vr+LPaFG9YqD
szf0sus4AigtY0bUQiKDxMw2vivJ/XkTfJdOTWou/jmDLEZnharbHAYMYkDeryCM
mMr2SYbWzClkHPwUo+4BRMLbadtnHb8BErP8pZiiMKqzVR21bg2S5DeAlz8P53j5
SFPnoqV3+iCKDqEkDd1ubQrYqkPpzrZrx/ra0I7CRKOqF2et+PaqeKyv51CCm4yS
eSFpfdKuXmtWSIeWBaSWW5F9ylAclZSHaqBSKUAMp6WOyX9c7zbuJxBRlEW51lV4
xWW2jd97sZcGfqY043OMeubFU/dHFZP4A59TABEBAAG0IFdlc2xleSBIZWFybiA8
d2hlYXJuQHJlZGhhdC5jb20+iQFUBBMBCAA+FiEE//efi1X022F25aCNPQbpZTyh
k8YFAlqMds4CGwMFCQPCZwAFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQPQbp
View allnamespace.diff
diff --git a/pkg/oc/cli/export/export.go b/pkg/oc/cli/export/export.go
index 6aa61129ab..e18af76a61 100644
--- a/pkg/oc/cli/export/export.go
+++ b/pkg/oc/cli/export/export.go
@@ -107,7 +107,7 @@ func NewCmdExport(fullName string, f kcmdutil.Factory, streams genericclioptions
cmd.Flags().BoolVar(&o.Exact, "exact", o.Exact, "If true, preserve fields that may be cluster specific, such as service clusterIPs or generated names")
cmd.Flags().BoolVar(&o.Raw, "raw", o.Raw, "If true, do not alter the resources in any way after they are loaded.")
cmd.Flags().StringVarP(&o.Selector, "selector", "l", o.Selector, "Selector (label query) to filter on")
- cmd.Flags().BoolVar(&o.AllNamespaces, "all-namespaces", o.AllNamespaces, "If true, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.")
+ cmd.Flags().BoolVarP(&o.AllNamespaces, "all-namespaces", "A", o.AllNamespaces, "If true, list the requested object(s) across
View gvm.sh
#!/usr/bin/env bash
set -e
usage()
{
echo "GVM is a simple golang version manager written in bash."
echo "$(basename $0) -v <version>"
}
View file.go
// Copyright 2019 RedHat
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
View gist:ff7cff02f3ffee0d81d34450f8e9e50e
// CreateService creates a service in pagerduty for the specified clusterid and returns the service key
func (data *Data) CreateService() (string, error) {
client := pdApi.NewClient(data.APIKey)
escalationPolicy, err := client.GetEscalationPolicy(string(data.escalationPolicyID), nil)
if err != nil {
return "", errors.New("Escalation policy not found in PagerDuty")
}
View gist:c602d13f468bf43cd718604c01955412
// CreateService creates a service in pagerduty for the specified clusterid and returns the service key
func (data *Data) CreateService() (string, error) {
client := pdApi.NewClient(data.APIKey)
escalationPolicy, err := client.GetEscalationPolicy(string(data.escalationPolicyID), nil)
if err != nil {
return "", errors.New("Escalation policy not found in PagerDuty")
}
clusterService := pdApi.Service{
View vault.go
package vault
import (
"context"
"errors"
"fmt"
"github.com/hashicorp/vault/api"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
View gist:d1880046af091539cd541dc8d41d69f5
{"level":"info","ts":1552671675.8280528,"logger":"cmd","msg":"Go Version: go1.11.5"}
{"level":"info","ts":1552671675.8281064,"logger":"cmd","msg":"Go OS/Arch: linux/amd64"}
{"level":"info","ts":1552671675.8281114,"logger":"cmd","msg":"Version of operator-sdk: v0.5.0"}
{"level":"info","ts":1552671675.8286614,"logger":"leader","msg":"Trying to become the leader."}
{"level":"info","ts":1552671676.0089798,"logger":"leader","msg":"Found existing lock with my name. I was likely restarted."}
{"level":"info","ts":1552671676.009001,"logger":"leader","msg":"Continuing as the leader."}
{"level":"info","ts":1552671676.1359704,"logger":"cmd","msg":"Registering Components."}
{"level":"info","ts":1552671676.136072,"logger":"kubebuilder.controller","msg":"Starting EventSource","controller":"clusterdeployment-controller","source":"kind source: /, Kind="}
{"level":"error","ts":1552671676.1360984,"logger":"cmd","msg":"","error":"no kind is registered for the type v1alpha1.ClusterDeployment in scheme \"k8s.io/client-go/kubernete
View gist:a3b18e3a22e33278a2f31296ef34c882
{"level":"info","ts":1552661375.5076823,"logger":"cmd","msg":"Go Version: go1.11.5"}
{"level":"info","ts":1552661375.50773,"logger":"cmd","msg":"Go OS/Arch: linux/amd64"}
{"level":"info","ts":1552661375.5077405,"logger":"cmd","msg":"Version of operator-sdk: v0.5.0"}
{"level":"info","ts":1552661375.507929,"logger":"leader","msg":"Trying to become the leader."}
{"level":"info","ts":1552661375.5466924,"logger":"leader","msg":"Found existing lock with my name. I was likely restarted."}
{"level":"info","ts":1552661375.546719,"logger":"leader","msg":"Continuing as the leader."}
{"level":"info","ts":1552661375.5718184,"logger":"cmd","msg":"Registering Components."}
{"level":"info","ts":1552661375.571883,"logger":"kubebuilder.controller","msg":"Starting EventSource","controller":"clusterdeployment-controller","source":"kind source: /, Kind="}
{"level":"error","ts":1552661375.5719047,"logger":"cmd","msg":"","error":"no kind is registered for the type v1alpha1.ClusterDeployment in scheme \"k8s.io/client-go/kubernetes/s
View day5.hx
import haxe.Timer;
import sys.io.File;
class Main {
static var charDiff:Int = 32;
static function removeFromAray(array:Array<String>) {
var endCheck = array.length - 1;
for (x in 0...endCheck) {
if (array.length <= x) {
You can’t perform that action at this time.