Skip to content

Instantly share code, notes, and snippets.

View jeremyxu2010's full-sized avatar

jeremyxu2010

View GitHub Profile
#!/bin/bash
THIS=$0
ARGS=$@
name=$(basename $THIS)
usage () {
cat <<EOF
Usage: $name: redirect input/output/error of a running process
Two ways to run this program:
@jeremyxu2010
jeremyxu2010 / Dockerfile
Last active September 25, 2019 02:01
kong 1.3.0 arm64 Dockerfile
FROM arm64v8/ubuntu:16.04
ENV KONG_VERSION 1.3.0
ENV OPENRESTY_VERSION 1.15.8.1
ENV LUAROCKS_VERSION 3.1.3
ENV PCRE_VERSION 8.43
ENV OPENSSL_VERSION 1.1.1c
RUN apt-get update && apt-get install -y libreadline-dev libncurses5-dev \
build-essential libpcre3-dev perl curl libssl-dev zlib1g-dev \
@jeremyxu2010
jeremyxu2010 / Dockerfile
Created September 6, 2019 23:19
kong 1.3.0 arm64 Dockerfile
FROM arm64v8/ubuntu:16.04
ENV KONG_VERSION 1.3.0
ENV OPENRESTY_VERSION 1.15.8.1
ENV LUAROCKS_VERSION 3.1.3
ENV PCRE_VERSION=8.43
ENV OPENSSL_VERSION 1.1.1c
RUN apt-get update && apt-get install -y libreadline-dev libncurses5-dev \
build-essential perl curl perl unzip m4 lua-yaml-dev wget git
@jeremyxu2010
jeremyxu2010 / .bash_aliases
Created July 24, 2019 10:13 — forked from a-sync/.bash_aliases
SSH / SCP wrapper with password configuration support
alias ssh=ssh-wrapper
alias scp=scp-wrapper
@jeremyxu2010
jeremyxu2010 / istio-sidecar-post-setup.sh
Created July 15, 2019 03:14
istio网格扩展在虚拟机上的初始化动作
#!/bin/bash
# local-vm-ip e.g. 192.168.2.200
# istio-control-plane-vm-ip e.g. 192.168.2.100
# k8s-service-cidr e.g. 10.68.0.0/16
# k8s-pod-cidr e.g. 172.20.0.0/24
# k8s-dns-svc-ip e.g. 10.68.0.10
# app-namespace e.g. bookinfo
# app-namespace-certs e.g. /tmp/certs.tar
# app-inbound-ports e.g. 8081,8082,8083
@jeremyxu2010
jeremyxu2010 / predixy.spec
Created July 15, 2019 03:11
predixy的rpm打包spec文件
%define debug_package %{nil}
Name: predixy
Version: 1.0.5
Release: 1%{?dist}
Summary: Predixy is a redis smart proxy. It supports redis sentinel and redis cluster.
Group: Development/Databases
License: BSD 3
URL: https://github.com/joyieldInc/predixy
@jeremyxu2010
jeremyxu2010 / gist:256a7e67942d3499d3ac
Created March 28, 2016 15:17
使用JavaCV完成h264编码的视频文件的编码
import org.bytedeco.javacpp.avcodec;
import org.bytedeco.javacpp.avutil;
import org.bytedeco.javacv.FFmpegFrameRecorder;
import org.bytedeco.javacv.FrameRecorder;
import org.bytedeco.javacv.Java2DFrameConverter;
import java.awt.*;
import java.awt.image.BufferedImage;
@jeremyxu2010
jeremyxu2010 / CachedThreadPoolWithQueue.java
Created November 21, 2015 10:14
add CachedThreadPool with queue
package test;
import java.util.concurrent.*;
/**
* Created by jeremy on 15/11/20.
*/
public class CachedThreadPoolWithQueue {
private static final RejectedExecutionHandler defaultHandler = new ThreadPoolExecutor.AbortPolicy();
private final ThreadPoolExecutor executor;