View kubectl exec cmd multiple pods (envoy example)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl -l{LABEL_SELECTOR} --no-headers -o custom-columns=":metadata.name" | xargs -I% kubectl exec % -- curl -X POST http://localhost:{ENVOY_ADMIN_PORT}/logging\?level\=debug |
View Update kubeconfig new cluster
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List clusters | |
aws eks list-clusters | |
# You may need to target different profiles | |
AWS_PROFILE={account-profile-name-here} aws eks list-clusters | |
# Update kubeconfig with cluster info | |
aws eks update-kubeconfig --name {cluster-name-here} | |
View gist:f2e26e02a784e7cae66795a3281dbdb2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# git fetch {remote} pull/{PR#}/head && git checkout FETCH_HEAD | |
git fetch upstream pull/855/head && git checkout FETCH_HEAD |
View WebhookVerification.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.use("/chargify", (req, res, next) => { | |
// This request header contains the signature of the hmac sha 256 of the sites secret with the raw body of the request | |
const webhookSignature = | |
req.headers["x-chargify-webhook-signature-hmac-sha-256"]; | |
try { | |
// Your secret shared site key that you got from Chargify earlier | |
// This is a SECRET and should be stored/retrieved in a safe manner, not source control (Kube Secret, etc.,) | |
const sharedKey = "b65ca1b9a6eaea838b7c536ca0ca5fe634214b5d"; | |
// The first step is to create a sha256 of our shared site key | |
const hmac = crypto.createHmac("sha256", sharedKey); |
View middleware.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const app = express(); | |
function rawBodySaver(req, res, buf, encoding) { | |
if (buf && buf.length) { | |
req.rawBody = buf.toString(encoding || "utf8"); | |
} | |
} | |
// For parsing application/json | |
app.use(express.json()); | |
// For parsing application/x-www-form-urlencoded (which is the Content-Type from Chargify) |
View Regex: Extract text from parenthesis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\(([^)]+)\) | |
## regexr.com/42om5 |
View gist:7d85e483eb1795bb47af42f8a1115a4d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
annotations: | |
nginx.ingress.kubernetes.io/proxy-connect-timeout: "21600000" | |
nginx.ingress.kubernetes.io/proxy-read-timeout: "21600000" | |
nginx.ingress.kubernetes.io/proxy-send-timeout: "21600000" | |
nginx.ingress.kubernetes.io/rewrite-target: / | |
name: ds-ingress | |
namespace: default |
View gist:ee525ba62bba605ad39088e667c13218
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: our-tls | |
namespace: default | |
type: kubernetes.io/tls | |
data: | |
tls.crt: abcde | |
tls.key: 12345 |
View recentQuery.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { render } from 'react-dom'; | |
const gql = require('graphql-tag'); | |
import { graphql } from 'react-apollo'; | |
import appRoot from 'app-root-path'; | |
import store from '../../store.js'; | |
const Recent_Query = gql(` | |
query recent_query($username: String! $type: recentTypess! ){ | |
recent (username: $username type: $type){ |
View gist:0c26acb07558fd730f455f1df4de8300
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { render } from 'react-dom'; | |
const gql = require('graphql-tag'); | |
import { graphql } from 'react-apollo'; | |
import appRoot from 'app-root-path'; | |
import store from '../../store.js'; | |
const Recent_Query = gql(` | |
query recent_query($username: String! $type: String! ){ | |
recent (username: $username type: $type){ |
NewerOlder