Skip to content

Instantly share code, notes, and snippets.

View Jimmy-Xu's full-sized avatar

Jimmy Xu Jimmy-Xu

  • Ant Group
  • Beijing, China
View GitHub Profile
@Jimmy-Xu
Jimmy-Xu / install-scribe-under-centos.sh
Last active September 30, 2015 12:49
scribe installation script on CentOS
#!/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 / install-guide-zulip-server-under-ubuntu14-04.md
Last active October 8, 2015 05:42
install guide for zulip server under ubuntu14.04
@Jimmy-Xu
Jimmy-Xu / secure-k8s-api-server.md
Created October 22, 2015 03:37 — forked from yuanying/secure-k8s-api-server.md
Build a secure kubernetes api server

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 December 9, 2015 17:50 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

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 December 14, 2015 16:45
upgrade Python 2.7.6 -> 2.7.9 on Ubuntu 14.04
#!/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 December 29, 2015 09:04 — forked from sheikhwaqas/setup-mysql.sh
Install MySQL Server on Ubuntu (Non-Interactive Installation)
# 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 January 5, 2016 10:05 — forked from scturtle/ftpserver.py
simple ftp server by python
#!/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 January 20, 2016 01:58
利用golang:1.5.3的docker镜像重新编译golang源码

下载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 January 20, 2016 02:00
go get支持显示进度条

修改 $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"},