Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am mlbiam on github.
  • I am mlbiam (https://keybase.io/mlbiam) on keybase.
  • I have a public key ASDXoMp87KwJItI-xBDR-U4pYBhvjWYF6Qz9teWx_3A3GQo

To claim this, I am signing this object:

#!/bin/python
import boto3
import sys
out_to = open(sys.argv[2],"w")
client = boto3.client('ssm')
response = client.get_parameters_by_path(Path=sys.argv[1],Recursive=True,WithDecryption=True)
@mlbiam
mlbiam / steps.md
Last active July 29, 2019 03:15
orchestra-to-aks.md
@mlbiam
mlbiam / bsidesdctraining.md
Last active October 19, 2020 12:47
BSidesDC Training
<?php
if (!defined('sugarEntry') || !sugarEntry) {
die('Not A Valid Entry Point');
}
require_once('modules/Users/authentication/SugarAuthenticate/SugarAuthenticate.php');
class HeaderAuthenticate extends SugarAuthenticate
{
@mlbiam
mlbiam / orchestra-login-central-cluster.yaml
Last active August 23, 2020 18:09
Add Cluster to Centralized OpenUnison
apiVersion: openunison.tremolo.io/v1
kind: Org
metadata:
name: cluster2
namespace: openunison
spec:
description: "My second cluster"
uuid: 04901973-5f4c-46d9-9e22-55e88e168776
parent: B158BD40-0C1B-11E3-8FFD-0800200C9A66
showInPortal: true
import requests
import logging
from urllib.parse import urlparse
from urllib.parse import parse_qs
import json
from os import system
from kubernetes import client, config
#logging.basicConfig(level=logging.DEBUG)
import jwt
import yaml
from uuid import uuid4
import datetime
import sys
import json
import tempfile
from os import system
# Generate a kubernetes configuration from a private key
@mlbiam
mlbiam / create-user-namespace.yaml
Last active October 20, 2021 00:16
Creates a namespace owned by the logged in user
---
apiVersion: openunison.tremolo.io/v1
kind: Workflow
metadata:
name: create-user-namespace
namespace: openunison
labels:
app.kubernetes.io/name: openunison
app.kubernetes.io/instance: openunison-orchestra
app.kubernetes.io/component: openunison-workflows
@mlbiam
mlbiam / ldap_check_alive.sh
Created February 20, 2022 15:47
ldap_check_alive.sh
#!/bin/bash
USER_DN="cn=ou_svc_account,ou=Users,DC=sub,DC=domain,DC=com"
USER_PASSWORD="start123"
PORT="10983"
if ! $(ldapsearch -x -D $USER_DN -w $USER_PASSWORD -b $USER_DN -s base -H ldap://127.0.0.1:$PORT/ -l 10 > /dev/null ) ; then
echo "failed"
# hard kill
kill -9 $(ps -A | grep java | awk '{print $1}')