Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Mierdin's full-sized avatar

Matt Oswalt Mierdin

View GitHub Profile
@Mierdin
Mierdin / pocketdedupe.py
Last active May 1, 2023 00:26
A Python script to intelligently remove duplicate entries from Pocket
#!/usr/bin/env python
from pocket import Pocket
import webbrowser, sys
# Get consumer key from cmd line
consumer_key = sys.argv[1]
request_token = Pocket.get_request_token(
consumer_key=consumer_key,
terraform apply
random_id.id: Refreshing state... [id=7Rnb0Q]
google_compute_health_check.k8sapi: Refreshing state... [id=k8sapi]
google_compute_health_check.observerhealth-influxdb: Refreshing state... [id=observerhealth-influxdb]
google_compute_global_address.nrefrontend: Refreshing state... [id=nrefrontend]
google_compute_health_check.httphealth: Refreshing state... [id=httphealth]
google_compute_health_check.httpshealth: Refreshing state... [id=httpshealth]
google_compute_disk.grafana_disk: Refreshing state... [id=grafana-disk]
google_project_iam_binding.ansible-bind: Refreshing state... [id=antidote-216521/roles/compute.viewer]
@Mierdin
Mierdin / AutoBFS.ps1
Last active November 2, 2018 19:16
Reaches into a Cisco UCS Instance, and iterates through every service profile, creating Netapp initiator groups and 10g boot LUNs for each one, and then putting each service profile's vHBA's WWPNs in the respective initiator groups. Each igroup that is created by this script will be mapped to the respective boot LUN. Currently tested with NetApp…
<#
Name: AutoBFS.ps1
Author: Matthew Oswalt
Created: 10/20/2013
Description: Reaches into a Cisco UCS Instance, and iterates through every service profile, creating Netapp initiator groups
and 10g boot LUNs for each one, and then putting each service profile's vHBA's WWPNs in the respective initiator groups.
Each igroup that is created by this script will be mapped to the respective boot LUN.
git review -s [10:50:57]
Enter passphrase for key '/Users/mierdin/.ssh/id_rsa':
Could not connect to gerrit.
Enter your gerrit username: mierdin
Trying again with ssh://mierdin@review.opencontrail.org:29418/Juniper/contrail-controller.git
Enter passphrase for key '/Users/mierdin/.ssh/id_rsa':
<traceback object at 0x1107a36c8>
We don't know where your gerrit is. Please manually create a remote
named "gerrit" and try again.
Traceback (most recent call last):
vagrant@st2dev:~/st2$ ST2_REPO_PATH=/home/vagrant/st2 ./st2common/bin/st2-run-pack-tests -p /opt/stackstorm/packs/napalm
Running tests for pack: napalm
Creating virtualenv in /tmp/st2-pack-tests-virtualenvs/napalm...
New python executable in /tmp/st2-pack-tests-virtualenvs/napalm/bin/python
Installing setuptools, pip...done.
Traceback (most recent call last):
File "/tmp/st2-pack-tests-virtualenvs/napalm/bin/pip", line 7, in <module>
from pip import main
File "/tmp/st2-pack-tests-virtualenvs/napalm/local/lib/python2.7/site-packages/pip/__init__.py", line 11, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
(napalm) vagrant@st2dev:~/st2$ ./st2common/bin/st2-run-pack-tests -p /opt/stackstorm/packs/napalm
Running tests for pack: napalm
Creating virtualenv in /tmp/st2-pack-tests-virtualenvs/napalm...
Overwriting /tmp/st2-pack-tests-virtualenvs/napalm/lib/python2.7/site.py with new content
New python executable in /tmp/st2-pack-tests-virtualenvs/napalm/bin/python
Installing setuptools, pip...done.
Overwriting /tmp/st2-pack-tests-virtualenvs/napalm/bin/activate with new content
Overwriting /tmp/st2-pack-tests-virtualenvs/napalm/bin/activate.fish with new content
Overwriting /tmp/st2-pack-tests-virtualenvs/napalm/bin/activate_this.py with new content
Overwriting /tmp/st2-pack-tests-virtualenvs/napalm/bin/activate.csh with new content
(virtualenv)vagrant@st2dev:~/st2$ ./st2common/bin/st2-run-pack-tests -p /opt/stackstorm/packs/napalm
Running tests for pack: napalm
Creating virtualenv in /tmp/st2-pack-tests-virtualenvs/napalm...
Using real prefix '/usr'
Overwriting /tmp/st2-pack-tests-virtualenvs/napalm/lib/python2.7/site.py with new content
New python executable in /tmp/st2-pack-tests-virtualenvs/napalm/bin/python
Installing setuptools, pip, wheel...done.
Overwriting /tmp/st2-pack-tests-virtualenvs/napalm/bin/activate with new content
Overwriting /tmp/st2-pack-tests-virtualenvs/napalm/bin/activate.fish with new content
Overwriting /tmp/st2-pack-tests-virtualenvs/napalm/bin/activate_this.py with new content
vagrant@st2dev:~$ curl -X DELETE -H 'Connection: keep-alive' -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'User-Agent: python-requests/2.11.1' -H 'X-Auth-Token: c64c7c82be38408f9dc406ceb2640d77' -H 'Content-Length: 0' http://127.0.0.1:9101/v1/executions/5826561132ed353e0b26994f
{
"status": "canceled",
"start_timestamp": "2016-11-11T23:36:49.158835Z",
"log": [
{
"status": "requested",
"timestamp": "2016-11-11T23:36:49.171000Z"
},
{
@Mierdin
Mierdin / gist:6e169f9e6af8469f3568f729d42e81bc
Created October 20, 2016 01:30
Debugging minikube with rkt support
~$ minikube start \ [17:47:25]
> --network-plugin=cni \
> --container-runtime=rkt \ --iso-url=https://github.com/coreos/minikube-iso/releases/download/v0.0.5/minikube-v0.0.5.iso
Starting local Kubernetes cluster...
Kubectl is now configured to use the cluster.
~$ kubectl get nodes [17:48:34]
The connection to the server 192.168.99.103:8443 was refused - did you specify the right host or port?
~$ minikube logs [17:52:29]
@Mierdin
Mierdin / todd-http-sample.json
Created April 22, 2016 09:29
Sample output of ToDD HTTP metrics
vagrant@todddev:~/go/src/github.com/Mierdin/todd$ todd run test-http-saas -y -j
RUNNING TEST: bb54adc33eaa3fcdaa8c550a5877cc839b8784da0a510e6f82e965ed9a0f7103
(Please be patient while the test finishes...)
2016-04-22 09:23:00.222214093 +0000 UTC INIT: (0/3) READY: (0/3) TESTING: (0/3) FINISHED: (3/3)
Done.
{
"8436bfd7f28ba4a47cb0addd5738ead80a25749156890ea50b628eb1d6509a3a": {