Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Mc.Spring mcspring

🎯
Focusing
View GitHub Profile
View Eureka vs Consul.md

Comparison of Spring Cloud with Eureka

I feel Consul.io does better in the following area:

  • The focus on scriptable configuration allows for better container management.
    Eureka requires either external Configuration Server or multiple configuration files.

  • The options for securing communications is more advanced.
    Eureka requires creating application with security settings desired. Default will allow HTTP only. Registration of end points assumes http but can be forced to https with code.

View gist:bba1d2770a02c5b510b67893bb64d96e
#########################################
# youdao helpers
COLOR_RED="\033[0;31m"
COLOR_GREEN="\033[0;32m"
COLOR_YELLOW="\033[0;33m"
COLOR_END="\033[0m"
FONT_I="\033[3m"
YOUDAO_ID=***
YOUDAO_KEY=***
@mcspring
mcspring / concourse.md
Created Oct 23, 2018 — forked from ahume/concourse.md
Concourse on Kubernetes
View concourse.md

Concourse on Kubernetes

This document outlines Brandwatch's Concourse installation running on Kubernetes. The full configuration can be found at https://github.com/BrandwatchLtd/concourse-ops (internal only currently). It's a fairly new installation (1-2 weeks) and we're slowly migrating work from our existing BOSH installation to this.

Comments/questions welcome below.

Summary

@mcspring
mcspring / README.md
Created Oct 23, 2018
concourse.ci on kubernetes via minikube
View README.md
@mcspring
mcspring / Makefile
Created Jun 26, 2018
Static build of nginx with custom openssl, pcre and zlib
View Makefile
# Author: Eric Pruitt (http://www.codevat.com)
# License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause)
# Description: This Makefile is designed to create a statically linked nginx
# binary without any dependencies on the host system's version of glibc.
NGINX_VERSION=1.15.0
OPENSSL_VERSION=1.0.2o
PCRE_VERSION=8.42
ZLIB_VERSION=1.2.11
View ubuntu_enable_bbr.sh
#!/bin/bash
set -eu
SYSCTL_FILE=/etc/sysctl.d/90-tcp-bbr.conf
# check root
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
@mcspring
mcspring / bash-colors.md
Created Nov 14, 2017 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.
View bash-colors.md

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@mcspring
mcspring / java cert.md
Last active Oct 25, 2017
Java 导入自定义证书
View java cert.md
keytool -import -alias ${alias} -keystore ${JAVA_HOME}/jre/lib/security/cacerts -file ${path-to-certificate-file}
  • ${alias} 请替换为你想使用的名称
  • ${JAVA_HOME} 请替换为你自己的 JAVA_HOME 目录
  • ${path-to-certificate-file} 请替换为你的 ca 证书路径

PS: 如果 keytool 要求你输入密码,该值默认为英文 changeit

View install_scrapy_on_centos_7.x.sh
### install pip on CentOS 7.x
yum install -y python-pip
yum install -y python-devel libssl-devel libxml2 libxml2-devel libxslt libxslt-devel openssl openssl-devel libffi libffi-devel
CFLAGS="-O0" pip install lxml
pip install scrapy
View kodotesting.go
package main
import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"os/user"
"path"