Skip to content

Instantly share code, notes, and snippets.

@wenzhixin
wenzhixin / install-openldap-gosa-ubuntu14.04
Last active July 10, 2020 05:36
Install guide for OpenLDAP and GOsa on Ubuntu 14.04
sudo apt-get install slapd ldap-utils
sudo dpkg-reconfigure slapd
sudo apt-get install gosa gosa-schema
sudo vi /etc/ldap/convert.conf << EOT
include /etc/ldap/schema/core.schema
include /etc/ldap/schema/cosine.schema
include /etc/ldap/schema/nis.schema
include /etc/ldap/schema/inetorgperson.schema
@Object905
Object905 / dns-discovery.rs
Last active December 5, 2025 17:11
Pingora kubernetes/DNS ServiceDiscovery
use async_trait::async_trait;
use hickory_resolver::TokioAsyncResolver;
use http::Extensions;
use pingora::lb::discovery::ServiceDiscovery;
use pingora::lb::selection::{BackendIter, BackendSelection};
use pingora::lb::{Backend, Backends, LoadBalancer};
use pingora::protocols::l4::socket::SocketAddr;
use pingora::{Error, ErrorSource, ErrorType, Result as PingoraResult};
use std::fmt::Debug;
use std::net::{IpAddr, SocketAddrV4};