Skip to content

Instantly share code, notes, and snippets.

View JensWalter's full-sized avatar

Jens Walter JensWalter

View GitHub Profile
@JensWalter
JensWalter / Dockerfile
Created August 9, 2020 15:06
tibco businessworks 5.14 docker install
FROM centos:7
RUN yum install -y unzip
WORKDIR /install
COPY silent.xml .
COPY TIB_TRA_5.11.0_linux_x86_64.zip .
COPY TIB_BW_5.14.0_linux26gl23_x86_64.zip .
COPY TIB_rv_8.4.6_linux_x86.zip .
COPY TIB_ems_8.5.1_linux_x86_64.zip .
@JensWalter
JensWalter / appscript.js
Created January 9, 2020 17:25
Calling SAP BAPIs from Google Sheets
var endpoint ="https://callable-xxxxxxxxx-uc.a.run.app";
var user = "user1";
var password = "secret1";
function invokeRFC(rfcName,payload) {
var options = {"method":"POST", "payload":payload, headers: {}};
//check authentication data
if(user.length>0){
var auth = "Basic " + Utilities.base64Encode(user + ":" + password);
options.headers['Authorization']=auth;
@JensWalter
JensWalter / authorizer.js
Last active November 9, 2022 14:03
Resolves the key name through a custom authorizer and maps the actual name into the lambda context.
const AWS = require("aws-sdk");
const APIGATEWAY = new AWS.APIGateway();
exports.handler = async (event, context) => {
var apiKey = event.authorizationToken;
//open arn for the whole API including all methods
let arn = event.methodArn.replace(/\/prod\/.*/,'/prod/*/*')
let keyname = 'unknown';
@JensWalter
JensWalter / jms_receiver.bal
Created December 8, 2018 17:42
jms receiver in ballerina
import ballerina/jms;
import ballerina/log;
import ballerina/runtime;
import ballerina/io;
jms:Connection conn = new({
initialContextFactory:"com.tibco.tibjms.naming.TibjmsInitialContextFactory",
providerUrl:"tcp://localhost:7222",
username:"admin",
password:"admin",
Description: >
Aurora Database Cluster with one replication instance and Multi Availability Zones - CI & CD over AWS
Parameters:
DbPassword:
Type: String
Default: mypassword
Subnet1:
Type: String
Default: subnet-3671ca6c
Subnet2:
@JensWalter
JensWalter / createSelfSignedCert.js
Last active July 18, 2022 07:17
generate a self signed certificate with AWS Lambda
const exec = require('child_process').exec;
const fs = require("fs");
exports.handler = function(event, context) {
console.log("creating certificate");
exec('openssl req -x509 -newkey rsa:4096 -keyout /tmp/key.pem -out /tmp/cert.pem -subj "/C=DE/ST=Bavaria/L=Munich/O=apimeister org/OU=org unit/CN=apimeister.com" -days 45 -nodes', (error, stdout, stderr) => {
if (error) {
throw error;
}
console.log("reading certificate");
@JensWalter
JensWalter / FormDataHandler.java
Created October 10, 2015 19:02
FormDataHandler for com.sun.net.httpserver.HttpHandler
package io.trivium.glue.binding.http;
import com.sun.net.httpserver.Headers;
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;