Skip to content

Instantly share code, notes, and snippets.


chenrui chenrui333

Block or report user

Report or block chenrui333

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
chenrui333 /
Last active Oct 3, 2019
Minikube golang v1.13.1 upgrade
$ make -j 16 all
which go-bindata || GO111MODULE=off GOBIN=/Users/rchen/go/bin go get
PATH="/Users/rchen/.gvm/bin:/Users/rchen/.goenv/bin:/Users/rchen/.nenv/shims:/Users/rchen/.nenv/bin:/Users/rchen/.avn/bin:/usr/local/opt/swagger-codegen@2/bin:/Users/rchen/.rbenv/shims:/Users/rchen/bin:/Users/rchen/.nvm/versions/node/v10.16.3/bin:/Users/rchen/.yarn/bin:/Users/rchen/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/munki:/opt/X11/bin:/Users/rchen/go/bin:/usr/local/opt/go/libexec/bin:/Users/rchen/bin:/Users/rchen/go/bin" go-bindata -nomemcopy -o pkg/minikube/assets/assets.go -pkg assets deploy/addons/...
which go-bindata || GO111MODULE=off GOBIN=/Users/rchen/go/bin go get
chenrui333 / settings.json
Last active Aug 29, 2019
my vscode workspace settings.json
View settings.json
"explorer.autoReveal": true,
"window.zoomLevel": 0,
"git.confirmSync": false,
"git.enableSmartCommit": true,
// The number of spaces a tab is equal to. This setting is overridden
// based on the file contents when `editor.detectIndentation` is true.
"editor.tabSize": 2,

cleanup the merged branches

git branch -r --merged | 
grep origin | 
grep -v '>' | 
grep -v master | 
xargs -L1 | 
cut -d"/" -f2- | 
xargs git push origin --delete
View gist:a6ab4f8f8d621ff5123d271bf7404d9b
git config --global push.default current
git config --global pull.rebase true

Keybase proof

I hereby claim:

  • I am chenrui333 on github.
  • I am chenrui ( on keybase.
  • I have a public key ASC7D-0GrczI0pjLAu6732VpYciib13jDdqkhoId5o46swo

To claim this, I am signing this object:

chenrui333 /
Last active Nov 5, 2018
iterm2 key bindings

keys for deletion and cursor-moving

  • cmd + Delete, send hex codes 0x15, delete a line
  • option + Delete, send hex codes 0x17, delete a word
  • cmd + <-, send hex code 0x01, move cursor to the beginning
  • cmd + ->, send hex code 0x015, move cursor to the end
chenrui333 /
Created Mar 2, 2017
Python Scripts Collections
#! /usr/bin/python
# reference:
import glob
from PyPDF2 import PdfFileWriter, PdfFileReader
for fname in glob.glob('./*.pdf'):
infile = PdfFileReader(fname, 'rb')
output = PdfFileWriter()
print("file name:", fname, "with pages: ", infile.getNumPages())
chenrui333 /
Last active Feb 18, 2017
Spring Tomcat Instrument

Source Code shows that it is only used for Tomcat 6. This is tied with Spring LTW (LoadTimeWeaving) functionality.

From Spring Documentation, it is not needed for Tomcat 8.0 and higher.

Do not define TomcatInstrumentableClassLoader anymore on Tomcat 8.0 and higher. Instead, let Spring automatically use Tomcat’s new native InstrumentableClassLoader facility through the TomcatLoadTimeWeaver strategy.

chenrui333 / Dockerfile
Created Jan 5, 2017
Dockerize Pingfederate
View Dockerfile
FROM amazonlinux:latest
MAINTAINER rui.chen <>
RUN yum install -y unzip wget
RUN wget --no-cookies --header "Cookie: gpw_e24=xxx; oraclelicense=accept-securebackup-cookie;" "" && \
yum install -y jdk-8u91-linux-x64.rpm
You can’t perform that action at this time.