Skip to content

Instantly share code, notes, and snippets.

oc get po glusterblock-storage-provisioner-dc-1-864g5 -o yaml
apiVersion: v1
kind: Pod
metadata:
annotations:
kubernetes.io/created-by: |
{"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"ReplicationController","namespace":"glusterfs","name":"glusterblock-storage-provisioner-dc-1","uid":"4a94ebd4-4402-11e8-8ea9-005056a2d8cc","apiVersion":"v1","resourceVersion":"18370005"}}
openshift.io/deployment-config.latest-version: "1"
openshift.io/deployment-config.name: glusterblock-storage-provisioner-dc
openshift.io/deployment.name: glusterblock-storage-provisioner-dc-1
apiVersion: v1
kind: ServiceAccount
metadata:
name: foo-sa
namespace: foo
---
kind: SecurityContextConstraints
apiVersion: v1
metadata:
annotations:
@DanyC97
DanyC97 / .docker-alias.bash
Created March 21, 2018 15:46 — forked from jverdeyen/.docker-alias.bash
A set of docker aliases
# ------------------------------------
# Docker alias and function
# ------------------------------------
# Get latest container ID
alias dl="docker ps -l -q"
# Get container process
alias dps="docker ps"
@DanyC97
DanyC97 / ansible-role-test.sh
Created January 8, 2018 17:05 — forked from geerlingguy/ansible-role-test.sh
Ansible Role Test Shim Script
#!/bin/bash
#
# Ansible role test shim.
#
# Usage: [OPTIONS] ./tests/test.sh
# - distro: a supported Docker distro version (default = "centos7")
# - playbook: a playbook in the tests directory (default = "test.yml")
# - cleanup: whether to remove the Docker container (default = true)
# - container_id: the --name to set for the container (default = timestamp)
# - test_idempotence: whether to test playbook's idempotence (default = true)
#!/usr/bin/python3
from pyVim.connect import SmartConnect, Disconnect
from pyVmomi import vim
import ssl
import atexit
if __name__ == '__main__':
# 接続情報
host = 'vCenter IP or Host Name'
username = 'administrator@vsphere.local'
@DanyC97
DanyC97 / NOTES.md
Created February 6, 2017 18:51 — forked from DenisIzmaylov/NOTES.md
Step By Step Guide to Configure a CoreOS Cluster From Scratch

Step By Step Guide to Configure a CoreOS Cluster From Scratch

This guide describes how to bootstrap new Production Core OS Cluster as High Availability Service in a 15 minutes with using etcd2, Fleet, Flannel, Confd, Nginx Balancer and Docker.

Content

@DanyC97
DanyC97 / old.yml
Created January 11, 2017 13:14 — forked from halberom/old.yml
ansible - example of looping yum packages with different setting for one of them
- name: Install the required rpms
yum: name={{ item }} state=latest
with_items:
- wget
- git
- net-tools
- bind-utils
- iptables-services
- bridge-utils
- bash-completion
@DanyC97
DanyC97 / curl.jinja
Created October 18, 2016 13:58 — forked from kevinburke/curl.jinja
Turn a requests request back into (roughly) the HTTP request that went over the wire. Also translates the request into a curl command
curl -X{{ method }} {{ url }}
{%- if query_string|length %}?{% endif %}
{{- query_string }} \
{%- for header, value in headers.iteritems() %}
-H '{{ header|urlencode }}: {{ value|urlencode }}'{% if not loop.last or params|length or auth %} \{% endif %}
{%- endfor -%}
{% if params|length %}{% for param, value in params.iteritems() %}
-d '{{ param.decode('utf-8')|urlencode }}={{ value.decode('utf-8')|urlencode }}'{% if not loop.last or auth %} \{% endif %}
{%- endfor %}{%- endif %}
{%- if auth %}
To clone all repos from your organisation, try the following one-liner:
ORG=company; curl "https://api.github.com/orgs/$ORG/repos?per_page=1000" | grep -o 'git@[^"]*' | xargs -L1 git clone
For user repos, try:
USER=foo; curl "https://api.github.com/users/$USER/repos?per_page=1000" | grep -o 'git@[^"]*' | xargs -L1 git clone
@DanyC97
DanyC97 / mint141516.md
Created January 24, 2016 10:32 — forked from hgomez/mint141516.md
Mint 14 -> Mint 15 -> Mint 16

Mint upgrade procedures

Some investigation and tests on how to upgrade Mint machine.

Tests performed on Mint Cinnamon 14/15/16, on physical machine 14->15 and VirtualBox VMs for 14->15->16 and 14->16.

As usual you could break your machine, so please do backups before and cross fingers.

Mint 14 -> Mint 15