Skip to content

Instantly share code, notes, and snippets.

View prb112's full-sized avatar

Paul Bastide prb112

View GitHub Profile
@prb112
prb112 / restartAllTasks.sh
Created May 13, 2017 11:41
Restart all tasks for a given cluster in Ambari
#!/bin/bash
#https://cwiki.apache.org/confluence/display/AMBARI/Add+a+host+and+deploy+components+using+APIs
CLUSTER=cluster
IP=localhost
curl -H 'X-Requested-By: ambari' --user admin:admin -i -X GET http://${IP}:8080/api/v1/clusters/${CLUSTER}/hosts -o /tmp/hosts.txt
for host in `cat /tmp/hosts.txt | grep -i host_name | awk '{print $NF}' | sed 's|"||g'`
@prb112
prb112 / server.xml
Created May 13, 2017 12:01
Server DataSource Server Demonstration
<server description="Database Server Demonstration ">
<featureManager>
<feature>webProfile-7.0</feature>
<feature>localConnector-1.0</feature>
</featureManager>
<httpEndpoint host="*" httpPort="9080" httpsPort="9443"
id="defaultHttpEndpoint" />
<applicationManager autoExpand="true" />
@prb112
prb112 / liquibase-change-log.sh
Created July 7, 2018 12:02
Dump Change Log in Liquibase
[PEM@db db2-updater]$ bin/tool/liquibase/liquibase --changeLogFile=`pwd`/bin/tool/liquibase/masterchangelog.xml --username=usernameXYZ --password=XYZPASS --url=jdbc:db2:DBP changelogSyncSQL
Liquibase Home: /home/myhomedir/db2-updater/bin/tool/liquibase
-- *********************************************************************
-- SQL to add all changesets to database history table
-- *********************************************************************
-- Change Log: /home/myhomedir/db2-updater/bin/tool/liquibase/masterchangelog.xml
-- Ran at: 7/6/18 3:43 PM
-- Against: XYZ@jdbc:db2:DBP
-- Liquibase version: 3.5.3
-- *********************************************************************
curl -k -X GET -H "Content-type:application/json" "http://<kms-node>:16000/kms/v1/keyversion/<key-version>/_eek?ee_op=decrypt&user.name=hdfs" -v
@prb112
prb112 / enumeration.yaml
Created September 4, 2015 00:30
Example of a Swagger Enumeration in YAML
#YAML Demonstration
swagger: '2.0'
info:
title: Demonstration of Swagger Yaml with Enumeration
description: Simple Demonstration of Enumeration
version: "1.0.0"
host: api.bastide.org
schemes:
- https
basePath: /1
package demo.kerberos;
import javax.security.auth.*;
import javax.security.auth.login.*;
import javax.security.auth.callback.*;
import javax.security.auth.kerberos.*;
import java.io.*;
public class App {
public static void main(String[] args) {
@prb112
prb112 / configuration-map-krb.json
Created June 10, 2019 17:24
Port forwarding for Zookeeper (to 5 remote hosts behind a firewall)
{
"88" : {
"auth-1" : 8088
}
}
package test;
public Test {
// TODO add an implementation.
}
@prb112
prb112 / pom.xml
Last active April 6, 2020 00:12
Shading to use with a new model
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>example</groupId>
<artifactId>resource-model-old</artifactId>
<version>3.0.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<template encoding-version="1.3">
<description></description>
<groupId>1aee98d5-0172-1000-7a2d-00d37a42e7da</groupId>
<name>Fhir Metadata Flow</name>
<snippet>
<connections>
<id>7fc1990d-d604-370e-0000-000000000000</id>
<parentGroupId>d7051a5f-6d05-30ab-0000-000000000000</parentGroupId>
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>