Skip to content

Instantly share code, notes, and snippets.

@diguage
diguage / 00readme.txt
Created December 6, 2024 09:26 — forked from yankay/00readme.txt
快速 启动一套 kubespray 集群(Ubuntu)
# 安装 kubespray
cd /opt
git clone https://github.com/kubernetes-sigs/kubespray.git
cd kubespray
pip3 install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
# 配置集群
# Copy ``inventory/sample`` as ``inventory/mycluster``
cp -rfp inventory/sample inventory/mycluster
@diguage
diguage / init.gradle
Last active July 20, 2021 05:54
Aliyun Mirrors for Gradle
apply plugin: EnterpriseRepositoryPlugin
class EnterpriseRepositoryPlugin implements Plugin<Gradle> {
// https://repo1.maven.org/maven2/
private static String CENTRAL_URL = "https://maven.aliyun.com/repository/central"
// http://jcenter.bintray.com/
private static String JCENTER_URL = "https://maven.aliyun.com/repository/jcenter"
// https://maven.google.com/
private static String GOOGLE_URL = "https://maven.aliyun.com/repository/google"
// https://plugins.gradle.org/m2/
@diguage
diguage / web-servers.md
Created March 30, 2021 01:45 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@diguage
diguage / LDAPTest.java
Last active August 1, 2019 08:18
It is a Java example for LDAP.
// Copy from http://www.adamretter.org.uk/blog/entries/LDAPTest.java
LDAPTest.javapackage ldaptest;
import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.directory.DirContext;
import javax.naming.directory.SearchControls;