Say you want to test something like maybe run something in minikube locally but connect to something running in the kube cluster.
Do your kube port foward
kubectl --context k8s-uw1-gcp port-forward prometheus-prometheus-server-7b6f9d99f8-m4vt6 9090
| ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC1gtEbO6GsjktlEvoxB/rOURq4XpyUa9COQWTQMyPtAut5tj+OfWZUMPeuS4IHnzaGvR1XFfNNrBOUbZlq99xUyUSjiL12TytJ3k0s54OcSSVNSxkScZFhkzvMbxCAWUfwwjCUH5m1WRbIIWp7lYMQ2qPyAs3FuBGsEoSGfnQ67e6IBmi4CxhGe/oyFahzVfw3ogpYjDPyi0jiDTCFRN6KknjmGlw9J7xg3hhTwq6qLRwKNn+4eE26kMImrGmrTy2Ml4eYqk/CqalILJZJoPeKwnTr2XqsWlAKTDcMNGkoo9mbrmweYmgdJSbMch7EmV6QCQL5T++cwyQuWsE0h0qHe5jZzpSuepcWxO6qydWsoR6nabfOj0aNsgrSWZob5U4iADHZ6q0bqWKIiHox4e8yX2KibGqAN+C59M7tEqq3wYqNpSRgPJXMLOOuw6w6exJC4kY/OScLNee0ERzQD33Yt8Sxkr5ysE7lFsqtq9+attbhI2XZumYXriU9fXS/cl8= xamox@eternal |
Say you want to test something like maybe run something in minikube locally but connect to something running in the kube cluster.
Do your kube port foward
kubectl --context k8s-uw1-gcp port-forward prometheus-prometheus-server-7b6f9d99f8-m4vt6 9090
| Yo dawg, I heard you like port-fowards so I'm going to port-forward your port-forward. | |
| Say you want to test something like maybe run something in minikube locally but connect to something running in the kube cluster. | |
| Do your kube port foward | |
| kubectl --context k8s-uw1-gcp port-forward prometheus-prometheus-server-7b6f9d99f8-m4vt6 9090 | |
| On your host system | |
| socat -v TCP-LISTEN:9091,fork TCP:127.0.0.1:9090 |
This guide was originally taken from: https://gist.github.com/mattiaslundberg/8620837 and updated to markdown as well as adding desktop and wireless setup
Download the archiso image from https://www.archlinux.org/ Use etcher to create USB drive: https://etcher.io/
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env python | |
| import elasticsearch | |
| import elasticsearch.helpers | |
| elasticSource = elasticsearch.Elasticsearch([{"host": "localhost", "port": 9200}]) | |
| elasticDestination = elasticsearch.Elasticsearch([{"host": "localhost", "port": 9200}]) | |
| # Setup source and destinations connection to Elasticsearch. Could have been different clusters | |
| # Delete index so we know it doesn't exist. | |
| elasticDestination.indices.delete(index="index_destination", ignore=[400, 404]) | |
| # Create index with nothing in it. | |
| elasticDestination.indices.create(index="index_source", ignore=[400, 404]) |
| ''' | |
| Tested with: | |
| Mongo 3.0.12 | |
| pymongo 3.3.0 | |
| Elasticsearch 2.1.2 | |
| Kibana 4.3.3 | |
| elasticsearch python 2.1.0 | |
| ''' |
| from SimpleCV import * | |
| cam = Camera() | |
| while True: | |
| img = cam.getImage().flipHorizontal() | |
| dist = img.colorDistance(Color.BLACK).dilate(2) | |
| segmented = dist.stretch(200,255) | |
| blobs = segmented.findBlobs() | |
| if blobs: | |
| circles = blobs.filter([b.isCircle(0.2) for b in blobs]) |
| ''' | |
| This is how to track a white ball example using SimpleCV | |
| The parameters may need to be adjusted to match the RGB color | |
| of your object. | |
| The demo video can be found at: | |
| http://www.youtube.com/watch?v=jihxqg3kr-g | |
| ''' | |
| print __doc__ |
| class AutoVivification(dict): | |
| """ | |
| Implementation of perl's autovivification feature. | |
| >>> a = AutoVivification() | |
| >>> a[1][2][3] = 4 | |
| >>> a[1][3][3] = 5 | |
| >>> a[1][2]['test'] = 6 | |
| >>> print a | |
| >>> {1: {2: {'test': 6, 3: 4}, 3: {3: 5}}} |