Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View mcspring's full-sized avatar
🎯
Focusing

Mc.Spring mcspring

🎯
Focusing
View GitHub Profile
@mcspring
mcspring / Makefile
Created June 26, 2018 07:36
Static build of nginx with custom openssl, pcre and zlib
# 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

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.

@mcspring
mcspring / concourse.md
Created October 23, 2018 10:02 — forked from ahume/concourse.md
Concourse on Kubernetes

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 October 23, 2018 10:02
concourse.ci on kubernetes via minikube
@mcspring
mcspring / ubuntu_enable_bbr.sh
Created March 22, 2018 02:45 — forked from Jamesits/ubuntu_enable_bbr.sh
Ubuntu enable BBR
#!/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 November 14, 2017 08:59 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

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 October 25, 2017 04:41
Java 导入自定义证书
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

@mcspring
mcspring / install_scrapy_on_centos_7.x.sh
Created July 6, 2017 08:33
Install Scrapy on CentOS 7.x
### 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
@mcspring
mcspring / kodotesting.go
Created January 17, 2017 10:18
kodotesting.go
package main
import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"os/user"
"path"
@mcspring
mcspring / globalize3_matchers.rb
Last active June 5, 2016 17:23
Globalize3 RSpec matchers
RSpec::Matchers.define :translate do |field, locales|
match do |model|
@field = field
@locales = locales
@results = []
@failures = []
locales.each do |locale|
expected_value = locale_value(locale)