This file contains hidden or 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
#!/bin/bash | |
SERVICE=${1:-init-tenant} | |
F8NS=${2:-fabric8} | |
while true;do | |
COUNT=$(kubectl get pod -l service=${SERVICE} -n ${F8NS} --no-headers=true|gwc -l) | |
if [[ ${COUNT} == 1 ]];then | |
RUN=$(kubectl get pod --no-headers=true -n ${F8NS} -l service=${SERVICE}|grep '1/1.*Running') | |
[[ -n ${RUN} ]] && break | |
elif [[ ${COUNT} == 0 ]];then |
This file contains hidden or 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
#!/bin/bash | |
set -e | |
# Set those!! | |
APIKEY="" | |
DOMAIN="" | |
RECORD="" | |
URL=https://dns.api.gandi.net/api/v5/domains/${DOMAIN}/records/${RECORD}/A | |
DNSIP=$(curl -s -H "X-Api-Key: $APIKEY" ${URL}| jq --raw-output '.rrset_values[0]') |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
# Author: Chmouel Boudjnah <[email protected]> | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may | |
# not use this file except in compliance with the License. You may obtain | |
# a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
This file contains hidden or 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
;; Get the current chrome tab and insert the title and the issue number link in | |
;; org format, gets the labels of the issue too via the github json api | |
;; Leverage on https://github.com/rejeep/chrome-cli.el for getting current tab | |
(defun my-get-labels-info-gh(issuenumber) | |
(let* ((url | |
(format "https://api.github.com/repos/openshiftio/openshift.io/issues/%s" issuenumber)) | |
(myt (my-github-parse-response (url-retrieve-synchronously url)))) | |
(string-join | |
(mapcar |
This file contains hidden or 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
Moved to https://github.com/chmouel/tzconverter |
This file contains hidden or 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
#!/bin/bash | |
set -e | |
#set -x | |
set -f | |
remotebranch=chmouel | |
repo=$1 | |
if [[ $1 == https://github.com* ]];then | |
repo=${repo/https:\/\/github.com\/} |
This file contains hidden or 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
#!/bin/bash | |
# Get current tab in Github and issue number and add a prefix the issue number to use in github branch | |
# i.e: git checkout -b $(ghprefix) | |
url=$(chrome-cli info|grep Url|sed 's/Url: //') | |
if [[ ${url} != *github.com*issues/[0-9]* ]];then | |
echo $url | |
echo "This don't seem to be a proper github tab" | |
exit | |
fi |
This file contains hidden or 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
#!/usr/bin/env python3 | |
# Use python3 | |
# Usage example : | |
# oc process openshift//cakephp-mysql-persistent -o json \ | |
# |python ~/os-template-filter-type.py BuildConfig dc | |
# will get the BuildConfig and the DeploymentConfig (alias dc) | |
# You can specify a specific name for example is=stream will get only the | |
# ImageStream named stream | |
import json | |
import sys |
This file contains hidden or 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
#!/bin/bash | |
set -e | |
# Your user name on OSIO | |
USER=${T-"SET YOUR USERNAME"} | |
# Get this from your Jenkins setting | |
API_TOKEN=${JENKINS_API_TOKEN:-"SET THIS"} | |
# You need to be login with oc or set this manually (but that may change on recration) |