Skip to content

Instantly share code, notes, and snippets.

@Jimmy-Xu
Jimmy-Xu / install-scribe-under-centos.sh
Last active Sep 30, 2015
scribe installation script on CentOS
View install-scribe-under-centos.sh
#!/bin/bash
#install scribe in docker container
echo '=================================================='
echo '===============Install necessary tools==============='
echo '=================================================='
yum update
yum install -y wget tar git make flex bison libtool autoconf automake openssl-devel libevent libevent-devel python-devel gcc-c++ byacc
@Jimmy-Xu
Jimmy-Xu / secure-k8s-api-server.md
Created Oct 22, 2015 — forked from yuanying/secure-k8s-api-server.md
Build a secure kubernetes api server
View secure-k8s-api-server.md

Build a secure kubernetes api server

Add Security Group

$ nova secgroup-add-rule \
       k8sbay-wlun44ixfi2o-secgroup_kubernetes-ahsiqsc4vgqj \
       tcp 6443 6443 0.0.0.0/0

CA

@Jimmy-Xu
Jimmy-Xu / install-comodo-ssl-cert-for-nginx.rst
Created Dec 9, 2015 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.
View install-comodo-ssl-cert-for-nginx.rst

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@Jimmy-Xu
Jimmy-Xu / build-python-2.7.9.sh
Created Dec 14, 2015
upgrade Python 2.7.6 -> 2.7.9 on Ubuntu 14.04
View build-python-2.7.9.sh
#!/bin/sh
#
# Installs Python 2.7.9 on Ubuntu 14.04 to include security updates
# Run this script with superuser privileges.
#
BASEDEPS="build-essential python-pip"
BUILDDEPS="libbz2-dev \
libc6-dev \
libgdbm-dev \
@Jimmy-Xu
Jimmy-Xu / setup-mysql.sh
Created Dec 29, 2015 — forked from sheikhwaqas/setup-mysql.sh
Install MySQL Server on Ubuntu (Non-Interactive Installation)
View setup-mysql.sh
# Download and Install the Latest Updates for the OS
apt-get update && apt-get upgrade -y
# Set the Server Timezone to CST
echo "America/Chicago" > /etc/timezone
dpkg-reconfigure -f noninteractive tzdata
# Enable Ubuntu Firewall and allow SSH & MySQL Ports
ufw enable
ufw allow 22
@Jimmy-Xu
Jimmy-Xu / ftpserver.py
Created Jan 5, 2016 — forked from scturtle/ftpserver.py
simple ftp server by python
View ftpserver.py
#!/usr/bin/env python2
# coding: utf-8
import os,socket,threading,time
#import traceback
allow_delete = False
local_ip = socket.gethostbyname(socket.gethostname())
local_port = 8888
currdir=os.path.abspath('.')
@Jimmy-Xu
Jimmy-Xu / build-golang-with-docker.md
Last active Jan 20, 2016
利用golang:1.5.3的docker镜像重新编译golang源码
View build-golang-with-docker.md

下载go源码

$ cd ~
$ wget https://storage.googleapis.com/golang/go1.5.3.linux-amd64.tar.gz
$ tar xzvf go1.5.3.linux-amd64.tar.gz

覆盖( 否则缺少~/go/src/cmd/api )

$ wget https://storage.googleapis.com/golang/go1.5.3.src.tar.gz
$ tar xzvf go1.5.3.src.tar.gz
@Jimmy-Xu
Jimmy-Xu / go-get-progress.md
Created Jan 20, 2016
go get支持显示进度条
View go-get-progress.md

修改 $GOROOT/src/cmd/go/vcs.go,作如下修改

// vcsGit describes how to use Git.
var vcsGit = &vcsCmd{
        name: "Git",
        cmd:  "git",

        createCmd:   []string{"clone --progress {repo} {dir}", "--git-dir={dir}/.git submodule update --init --recursive"},
        downloadCmd: []string{"pull --ff-only", "submodule update --init --recursive"},