Skip to content

Instantly share code, notes, and snippets.

@nabsha
nabsha / show-remote-branch-info.sh
Created February 19, 2016 04:24 — forked from michaelkirk/show-remote-branch-info.sh
sort remote branches by age
#!/bin/sh
#
# Too many crusty old git branches? Run this to find likely candidates for deletion
# It lists all the remote branches and sorts them by age.
#
# Folks at pivotal shared this with me
#
#$ . show-remote-branch-info.sh
# 2012-05-04 09:42:29 -0700 4 minutes ago Ted & Bill \torigin/hey_Bill
#!/usr/bin/python
# python get-all-stash-repos.py [host] [project] [user] [password] [target-root-dir]
import sys
import os
import stashy
import git
import argparse
import getpass
parser = argparse.ArgumentParser(description='get all repositories from stash')
@nabsha
nabsha / uber-mule.xsl
Last active October 27, 2018 09:39
replace/merge/combine mule sub-flow and flow in-place of flow-ref
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ns0="http://www.mulesoft.org/schema/mule/core">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
{
"basics": {
"name": "Nabeel Shaheen",
"label": "Integration Consultant",
"picture": "",
"email": "nabeel@cloud-integrators.com.au",
"phone": "+61 416 648 428",
"website": "https://nabsha.wordpress.com",
"summary": "Integration Consultant with 15+ years of experience in integrating enterprise applications using state-of-the-art technologies. Well versed in Mulesoft offerings including Anypoint Platform, API Manager, API Designer, Runtime Manager, etc. Experienced in deployment of Runtime Manager in a variety of combinations including Cloudhub, AWS Platform, Openshift/Kuberenetes and hybrid configurations. ",
"location": {
1
00:02:02,880 --> 00:02:07,488
Thank god
2
00:02:09,024 --> 00:02:09,792
Thanks God
3
00:02:10,816 --> 00:02:11,840
@nabsha
nabsha / mule
Last active May 27, 2020 23:16
This is the updated mule wrapper script for 3.9.x standalone enterprise to run on MacOS catalina
#! /bin/sh
# Copyright (c) 1999, 2013 Tanuki Software, Ltd.
#
# Java Service Wrapper sh script. Suitable for starting and stopping
# wrapped Java applications on UNIX platforms.
# Get the fully qualified path to the script
case $0 in
/*)
@nabsha
nabsha / getAllOseSecrets.sh
Created May 26, 2020 08:05
Get all openshift Opaque secrets and base64 decode then in a single line
oc get secrets -o wide --all-namespaces=true | grep qat | grep mule | awk '{ system("oc get secrets --namespace=" $1 " " $2 " -o yaml | grep credentials | cut -d: -f2 | base64 -d") }'
@nabsha
nabsha / .gitconfig
Last active August 13, 2020 02:17 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Nabeel Shaheen
email =
username =
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
@nabsha
nabsha / mergecsv.py
Last active December 20, 2020 05:17
Generates a column-wise csv by merging all columns in all csv in given folder
import os
import pandas as pd
import glob
def merge_csvs(results_, column_prefix):
path = results_ # use your path
all_files = glob.glob(path + "/*.csv")
print(all_files)
li = []
#!/bin/sh
alias anypoint-cli='docker run --rm --name anypoint-cli -it integrational/anypoint-cli:3.0.0'
for env in TST SIT UAT PRD
do
echo "Environment is " $env
anypoint-cli --bearer $1 --organization $2 --environment $env --output text runtime-mgr cloudhub-application list
done