Skip to content

Instantly share code, notes, and snippets.

Franky Braem fbraem

View GitHub Profile
View EntityClassReflectionExtension.php
<?php declare(strict_types = 1);
namespace App\PHPStan;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\MethodsClassReflectionExtension;
use PHPStan\Analyser\OutOfClassScope;
use PHPStan\Type\ObjectType;
@fbraem
fbraem / mqstandards.js
Created Mar 15, 2019
Check MQ attributes meet standards using JavaScript and MQWeb
View mqstandards.js
// Doing the same as https://mqgem.wordpress.com/2019/03/11/attributes-standards-mqscx/
// But using JavaScript and MQWeb (https://www.mqweb.org)
var http = require('http');
var options = {
hostname : '127.0.0.1',
port : 8081,
path : '/api/queue/inquire/PIGEON',
method : 'GET',
headers : {
@fbraem
fbraem / clusview.html
Created Feb 28, 2019
MQ Clusterdiagram using MQWeb and vis.js
View clusview.html
<html>
<head>
<link rel="stylesheet" href="/node_modules/vis/dist/vis.min.css"></link>
<script type="text/javascript" src="/node_modules/vis/dist/vis.min.js"></script>
<script type="text/javascript" src="/node_modules/axios/dist/axios.min.js"></script>
<title>CLuster View</title>
</head>
<body>
<h1>Cluster View</h1>
<div id="clusterView"></div>
@fbraem
fbraem / mqstats.py
Last active Jan 25, 2019
Collect MQ statistics with MQWeb and MQ triggering
View mqstats.py
'''
Get/browse all queue statistic messages from a queue (default is SYSTEM.ADMIN.STATISTICS.QUEUE).
MQWeb (http://www.mqweb.org) is used to translate the MQADMIN message to JSON.
It is assumed that MQWeb is running on localhost.
'''
import json
import httplib
import socket
import argparse
@fbraem
fbraem / MongoDBMT.cpp
Created Dec 12, 2015
MongoDB Multithread Test
View MongoDBMT.cpp
#include "Poco/MongoDB/MongoDB.h"
#include "Poco/MongoDB/Connection.h"
#include "Poco/MongoDB/Database.h"
#include "Poco/MongoDB/Cursor.h"
#include "Poco/MongoDB/Array.h"
#include "Poco/Mutex.h"
#include <Poco/MongoDB/PoolableConnectionFactory.h>
@fbraem
fbraem / UTF8Escape.cpp
Last active Aug 29, 2015
UTF8Escape class for POCO
View UTF8Escape.cpp
#include "Poco/UTF8Escape.h"
#include "Poco/UTF8Encoding.h"
#include "Poco/NumberFormatter.h"
#include "Poco/Ascii.h"
namespace Poco {
std::string UTF8Escape::escape(const std::string &s)
{
return escape(s.begin(), s.end());
You can’t perform that action at this time.