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 | |
if [ "$#" -ne 3 ]; then | |
echo "usage: sh thread-analyze.sh <pid> <number-of-dumps> <interval>" | |
exit | |
fi | |
count=$2 | |
for i in `seq 1 $count`; | |
do | |
jstack -l $1 > thread_dump_`date "+%F-%T"`.txt & |
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
Jenkins.instance.getItemByFullName("manuri/test-build") | |
.getBuildByNumber(123) | |
.finish( | |
hudson.model.Result.ABORTED, | |
new java.io.IOException("Aborting build") | |
); |
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
listen *:80; | |
server_name maven.kasunbg.org; | |
access_log /var/log/nginx/maven.kasunbg.org/access.log; | |
error_log /var/log/nginx/maven.kasunbg.org/error.log; | |
# allow large uploads of files - refer to nginx documentation | |
client_max_body_size 3072m; | |
# optimize downloading files larger than 1G - refer to nginx doc before adjusting |
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
#Sample Testgrid deployment / infrastructure.properties file. | |
#Thu May 23 11:59:20 UTC 2019 | |
DepValue1=12345 | |
TESTGRID_TINKERER_PASSWOR=******** | |
TESTGRID_TINKERER_ENDPOINT=http\://localhost\:8080/deployment-tinkerer/v0.9 | |
BallerinaVersionType=RC | |
dockerhub_ballerina_scenarios_username=ballerinascenarios | |
RCLocation=https\://product-dist.ballerina.io/nightly/0.992.0-m2-SNAPSHOT/ballerina-0.992.0-m2-SNAPSHOT.zip | |
ElasticSearchEndpoint=https\://search-testgrid-dev-********.us-east-1.es.amazonaws.com | |
IS_TESTGRID=True |
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
set -euxo pipefail # This provide better error handling for shell scripts | |
HOME=`pwd` | |
TEST_SCRIPT=test.sh | |
function usage() | |
{ | |
echo " | |
Usage bash test.sh --input-dir /workspace/data-bucket/in --output-dir /workspace/data-bucket/out |
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
pipeline { | |
agent { | |
docker { image 'mysql:5.6.37' } | |
} | |
stages { | |
stage('Run tests') { | |
steps { | |
sh 'pwd' | |
sh """ |
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
<Colors> | |
<Red>FF0000</Red> | |
<Blue>0000FF</Blue> | |
<Green>008000</Green> | |
</Colors> |
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
comm -23 <(aws ec2 describe-security-groups --query 'SecurityGroups[*].GroupId' --output text | tr '\t' '\n'| sort) \ | |
<(aws ec2 describe-instances --query 'Reservations[*].Instances[*].SecurityGroups[*].GroupId' --output text | tr '\t' '\n' | sort | uniq) \ | |
| tee -a unused-security-groups-in-ec2.txt | |
for x in `cat unused-security-groups-in-ec2.txt`; do echo 'deleting sg: $x' ; aws ec2 delete-security-group --group-id $x; done |
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
# Instructions and command outputs when running helm install for apim-analytics | |
# Repo: https://github.com/wso2/kubernetes-apim/tree/master/helm/pattern-1 | |
kasun@gaje:~/k8s/kubernetes-apim/helm/pattern-1$ helm install --name wso2apim-with-analytics-rdbms-service -f mysql/values.yaml stable/mysql --namespace wso2 | |
NAME: wso2apim-with-analytics-rdbms-service | |
LAST DEPLOYED: Sat Feb 23 11:30:01 2019 | |
NAMESPACE: wso2 | |
STATUS: DEPLOYED | |
RESOURCES: | |
==> v1/Secret |
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 | |
kubectl get namespaces | sort -n -k3 | grep "kubernetes-namespace.*d$" | awk '{print $1}' | xargs kubectl delete namespaces |