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
# On host macOS open up terminal and run: | |
``` | |
cd /Applications/Parallels\ Desktop.app/Contents/Resources/Tools | |
python -m http.server | |
``` | |
# On the VM open a terminal and run the following: | |
``` | |
curl http://10.211.55.2:8000/prl-tools-lin-arm.iso -o /tmp/prl-tools.iso |
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 |
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} | |
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 |
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); |
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) |
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 |
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 |
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 |
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){ |
NewerOlder