Skip to content

Instantly share code, notes, and snippets.

Jimmy Xu Jimmy-Xu

Block or report user

Report or block Jimmy-Xu

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
Jimmy-Xu / logrus_hooks.go
Created May 22, 2019 — forked from miguelmota/logrus_hooks.go
Golang Logrus show filename and line number
View logrus_hooks.go
package logger
import (
View Simple vsock setup for

Simple vsock setup for QEMU


Host Kernel: rawhide 4.13.0-0.rc6.git4.2.fc28.x86_64 (on Fedora 24)

QEMU is mainline built from sources: QEMU emulator version 2.10.50 (v2.10.0-105-g223cd0e)

Guest: clear-17460-kvm.img (which has vsock support)

Jimmy-Xu / ssh_config
Created Apr 16, 2019 — forked from rbenaley/ssh_config
GitHub ssh access via HTTP Proxy
View ssh_config
user git
port 443
proxycommand socat - PROXY:<hostname>:%h:%p,proxyport=<port>
Jimmy-Xu / yamux-exmaple.go
Created Apr 12, 2019 — forked from fatih/yamux-exmaple.go
A simple working yamux example
View yamux-exmaple.go
package main
import (
View gist:d7cdde841f93ccdaa28b992d86ef80c0
package main
import (
Jimmy-Xu / lambda-basic-auth.js
Created Jan 17, 2019 — forked from lmakarov/lambda-basic-auth.js
Basic HTTP Authentication for CloudFront with Lambda@Edge
View lambda-basic-auth.js
'use strict';
exports.handler = (event, context, callback) => {
// Get request and request headers
const request = event.Records[0].cf.request;
const headers = request.headers;
// Configure authentication
const authUser = 'user';
const authPass = 'pass';
View gist:c226d20ee5d90078cc9cb729fa4adeba
curl -OL
tar -xzf libtool-2.4.2.tar.gz
cd libtool-2.4.2
./configure && make && sudo make install
# brew install ''
# brew test ab
curl -O
tar zxvf httpd-2.4.2.tar.bz2

Install cask that extends the brew command :

brew install phinze/cask/brew-cask

Install calibre using cask :

brew cask install calibre
Jimmy-Xu / .screenrc
Created Nov 13, 2018 — forked from hilezi/.screenrc
Mac OS X Terminal .screenrc
View .screenrc
vbell off
autodetach on
startup_message off
shell -$SHELL
allpartial off
defc1 off
defencoding utf8
bind b encoding big5 utf8
bind u encoding utf8 utf8
Jimmy-Xu /
Last active Nov 1, 2018
get vendor of repo
# env
# clean
ls -d */ | xargs -i rm -rf {}
rm -rf repo.txt
You can’t perform that action at this time.