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 / collapsible-markdown.md
Created October 25, 2018 08:05 — forked from joyrexus/README.md
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@Jimmy-Xu
Jimmy-Xu / gist:4446baa090209926e54a0f327477848e
Created September 26, 2018 05:56 — forked from gsong/gist:6321633
Bash script to generate SSL csr/key/crt
#!/bin/bash
# Usage:
#
# ssl_setup [--self] <name> <csr_config>
#
# This script is used to generate key and CSR for use HTTPS in Nginx.
#
# --self Generate self-signed certificate in addition to key and CSR.
# name Output files will be named as <name>.key and <name>.csr.
@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 / install-k8s-cluster-with-kubeadm.md
Last active June 7, 2018 13:11
使用kubeadm创建一个K8s的Cluster
@Jimmy-Xu
Jimmy-Xu / demo.md
Created April 29, 2018 03:03 — forked from pwittrock/demo.md
apiserver-builder demo

apiserver-builder demo

Uses v0.1-alpha.21

boilerplate.go.txt

/*
Copyright 2017 The Kubernetes Authors.
@Jimmy-Xu
Jimmy-Xu / GitHub-Forking.md
Created April 27, 2018 04:42 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@Jimmy-Xu
Jimmy-Xu / readme.md
Last active April 23, 2018 14:39
pi quick start

download pi binary

from https://github.com/hyperhq/pi/releases

set credentials

$ pi config set-credentials demo --region=gcp-us-central1 \
  --access-key="5ZWV9xxxxxxxxxxVO6XG9BD" \
  --secret-key="4Okb91DygoRxxxxxxxxxOYqLojFmK5BQlXv"
@Jimmy-Xu
Jimmy-Xu / install-proxychains-ng.sh
Created April 21, 2018 05:38 — forked from ifduyue/install-proxychains-ng.sh
Install proxychains-ng on Centos
#!/bin/sh
# Usage:
# wget -O- https://gist.githubusercontent.com/ifduyue/dea03b4e139c5758ca114770027cf65c/raw/install-proxychains-ng.sh | sudo bash -s
set -eu
version=4.12
wget https://github.com/rofl0r/proxychains-ng/archive/v$version.tar.gz
tar xf v$version.tar.gz
@Jimmy-Xu
Jimmy-Xu / watchPods.go
Created February 28, 2018 08:08 — forked from ctaggart/watchPods.go
Kubernetes watch pods
// some updates for https://rsmitty.github.io/Kubernetes-Events/
// and http://blog.ctaggart.com/2016/09/accessing-kubernetes-api-on-google.html
import (
"encoding/base64"
"fmt"
"log"
"net/http"
"time"
@Jimmy-Xu
Jimmy-Xu / run-openvpn-on-hyper.md
Last active December 22, 2017 07:21
Run OpenVPN on Hyper.sh
  1. openvpn client(localhost) -> openvpn server(hyper container)
  2. openvpn client(hyper container) -> openvpn server(hyper container) #different hyper account
$ docker search openvpn | head -n 5
NAME                           DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
kylemanna/openvpn              OpenVPN server in a Docker container compl...   316                  [OK]
haugene/transmission-openvpn   Docker container which runs Transmission t...   47                   [OK]
dperson/openvpn-client                                                         29                   [OK]