Skip to content

Instantly share code, notes, and snippets.

View ChatchaiJ's full-sized avatar

Chatchai Jantaraprim ChatchaiJ

View GitHub Profile
var SUFFIX = 'dc=vis,dc=net';
var pfUsername = '<ADMINDN>';
var pfPassword = '<ADMINPW>';
var url = 'ldaps://vis.res.eq.edu.au';
var filter = '(uid=mjwoo1)';
var oldPassword = "oldpw";
var newPassword = "newpw";
var Client, testClient, anon_client;
@narate
narate / docker_service_report.py
Last active August 12, 2023 08:07
Show all running docker services details for usable Copy and Paste
import docker
import json
def to_mounts_string(mounts):
l = []
for m in mounts:
l.append('Type = {}, Source = {}, Target = {}'
.format(m.get('Type'), m.get('Source'), m.get('Target')))
return json.dumps(l, sort_keys=True, indent=4, ensure_ascii=False)