Skip to content

Instantly share code, notes, and snippets.

View MLukman's full-sized avatar

Muhammad Lukman Nasaruddin MLukman

View GitHub Profile
#import <Foundation/Foundation.h>
#import "Box2D.h"
class GamePhysicsContactListener : public b2ContactListener
{
protected:
NSInvocation *invocation;
public:
@MLukman
MLukman / kubix
Created March 5, 2020 08:33
Script to easily switch between namespaces within TM Kubix clusters
#!/bin/bash
################################################################################
# Script Name : kubix.sh
# Description : GUI menu to switch Kubix cluster and namespace
# Args : kubix.sh [clustername [namespacename]]
# Author : Muhammad Lukman bin Nasaruddin
# Email : lukman.nasaruddin@tm.com.my
################################################################################
unset CLUSTERS
declare -A CLUSTERS
@MLukman
MLukman / get-server-ssl-public-key-hash.sh
Created February 2, 2021 13:43
A simple Linux shell script to get the SHA256 hash of the public key of SSL certificate of an online server (most commonly to implement SSL pinning)
#!/bin/sh
if [ -z $(which openssl) ]; then
echo "Error: OpenSSL is not installed" >&2
exit 1
fi
if [ "$#" -lt 1 ] || [ -n "${1##*:*}" ]; then
echo "Usage: $0 URL:PORT" >&2
exit 1
@MLukman
MLukman / LdapAdminAuthenticator.php
Last active November 4, 2022 14:21
Authenticator class to allow PimcoreLdapBundle (https://pimcore.com/en/developers/marketplace/blackbit_digital_commerce/pimcore-ldap_e48456) to work on Pimcore 10.5 and above
<?php
namespace App\Service;
use Alep\LdapBundle\Service\Ldap;
use Exception;
use Pimcore\Bundle\AdminBundle\Security\Authenticator\AdminAbstractAuthenticator;
use Pimcore\Bundle\AdminBundle\Security\User\User;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Core\Exception\AuthenticationException;