Skip to content

Instantly share code, notes, and snippets.

View keontang's full-sized avatar

Jiyuan Tang keontang

  • caicloud.io
  • Hangzhou, China
View GitHub Profile
@keontang
keontang / Dockerfile
Created November 29, 2017 16:10 — forked from luxas/Dockerfile
Build Kubernetes binaries for ARM on amd64
FROM golang:1.5.2
MAINTAINER Lucas Käldström <lucas.kaldstrom@hotmail.co.uk>
# Enable cgo cross-compilation for armel
RUN echo "deb http://emdebian.org/tools/debian/ jessie main" > /etc/apt/sources.list.d/crosstools.list \
&& curl -s http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | apt-key add - \
&& dpkg --add-architecture armel \
&& apt-get update \
&& apt-get install -y build-essential crossbuild-essential-armel rsync upx
@keontang
keontang / Makefile
Created July 12, 2017 11:09 — forked from prwhite/Makefile
Add a help target to a Makefile that will allow all targets to be self documenting
# Add the following 'help' target to your Makefile
# And add help text after each target name starting with '\#\#'
help: ## Show this help.
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
# Everything below is an example
target00: ## This message will show up when typing 'make help'
@echo does nothing
@keontang
keontang / aliyuncli-ecs.md
Created July 8, 2016 14:47 — forked from dobaduc/aliyuncli-ecs.md
Getting started with Aliyun ECS API

Installation

Check out the guideline here: https://github.com/aliyun/aliyun-cli ( using Google translator)

Install python pip if necessary

curl https://bootstrap.pypa.io/get-pip.py | sudo python

Install aliyuncli

@keontang
keontang / Makefile
Created June 16, 2016 05:00 — forked from border/Makefile
json example in golang
include $(GOROOT)/src/Make.inc
GOFMT=gofmt -spaces=true -tabindent=false -tabwidth=4
all:
$(GC) jsontest.go
$(LD) -o jsontest.out jsontest.$O
format:
$(GOFMT) -w jsontest.go
@keontang
keontang / gist:133a029af96e9cbaedf1534094d07a75
Created April 5, 2016 06:15 — forked from gfrey/gist:8472007
Upstart script for haproxy with support for reload.
description "Properly handle haproxy"
start on startup
env PID_PATH=/var/run/haproxy.pid
env BIN_PATH=/usr/sbin/haproxy
script
exec /bin/bash <<EOF
$BIN_PATH -f /etc/haproxy.cfg -D -p $PID_PATH
@keontang
keontang / installHAProxy.sh
Created March 30, 2016 14:01 — forked from emgee3/installHAProxy.sh
Install HAProxy in Ubuntu 14.04 or 12.04
#!/usr/bin/env bash
#
# Install HAProxy
# Script works on Ubuntu 12.04 and 14.04 only
set -e
set -u
set -o pipefail