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 / 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 / LoggerFilter
Created December 13, 2017 14:32 — forked from calo81/LoggerFilter
Filter for reading and logging HttpServletRequest body, and resetting the input stream
package com.paddypower.financials.market.management.rest.logging;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
@Jimmy-Xu
Jimmy-Xu / build-fnproject.md
Last active November 20, 2017 10:01
build fnproject/fn and fnproject/cli

build fnproject/cli(command client)

准备:
mkdir -p $GOPATH/src/github.com/fnproject
cd $GOPATH/src/github.com/fnproject
git clone https://github.com/fnproject/cli.git
cd cli

for p in yaml mgo
@Jimmy-Xu
Jimmy-Xu / installing-openwhisk-on-ubuntu.md
Last active November 17, 2017 13:59 — forked from epiphone/installing-openwhisk-on-ubuntu.md
Installing OpenWhisk on Ubuntu Server 16.04

Configuring the OpenWhisk server

This guide contains instructions on manually setting up Openwhisk and CouchDB on a fresh Ubuntu 16.04 server.

The guide is based on the OpenWhisk Ansible README, which at the time of writing is missing some key steps and gotchas - hence this new guide.

1. Dependencies

sudo apt-get update
@Jimmy-Xu
Jimmy-Xu / curl-github.md
Created October 10, 2017 05:22 — forked from tazjel/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@Jimmy-Xu
Jimmy-Xu / do_test_hyperd.sh
Last active October 10, 2017 08:02
do_test_hyperd.sh
#!/bin/bash
hack/test-cmd.sh
rlt=$?
#################
END_TS=`date '+%s'`
echo "Duration: $((END_TS - START_TS)) (seconds)"
###############################################
@Jimmy-Xu
Jimmy-Xu / slack.sh
Created September 28, 2017 02:54
slack.sh
#!/bin/bash
TOKEN="$1"
CHANNEL_ID="$2"
MESSAGE="$3"
ATTACHMENT="$4"
NICK="HykinsBot"
EMOJI=":jenkins:"
curl -X POST \
-F token=$TOKEN \