Skip to content

Instantly share code, notes, and snippets.

View kezhenxu94's full-sized avatar
Working From Home

kezhenxu94 kezhenxu94

Working From Home
View GitHub Profile
@kezhenxu94
kezhenxu94 / custom.css
Created August 21, 2023 04:13
Custom css to set monospaced fonts in Safari for GitHub and Google
@font-face{
font-family: 'JetBrains Mono';
src: url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/webfonts/JetBrainsMono-Regular.woff2') format('woff2'),
url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/ttf/JetBrainsMono-Regular.ttf') format('truetype');
}
/* GitHub */
.logged-in * {
font-family: 'JetBrains Mono';
}
@kezhenxu94
kezhenxu94 / .gitconfig
Created April 20, 2021 01:31
gitconfig
[alias]
st = status
co = checkout
[user]
name = kezhenxu94
email = kezhenxu94@apache.org
signingkey = F5B319063296F6B8207748D58BD99F552D9F33D7
[commit]
gpgsign = true
[gpg]
@kezhenxu94
kezhenxu94 / tmux.conf
Created December 10, 2020 15:24 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@kezhenxu94
kezhenxu94 / post-release-skywalking-python.sh
Last active September 13, 2021 02:36
Script to prepare the release of SkyWalking Python
#!/usr/bin/env sh
# Prerequisites
# 1. vote passed
set -ex
[ -z "$VERSION" ] && echo "VERSION is not set" && exit 1
if ls skywalking > /dev/null 2>&1; then
@kezhenxu94
kezhenxu94 / post-release-skywalking-cli.sh
Last active October 19, 2021 03:00
Script to release Apache SkyWalking CLI
#!/usr/bin/env sh
# Prerequisites
# 1. vote passed
set -ex
[ -z "$VERSION" ] && echo "VERSION is not set" && exit 1
if ls skywalking > /dev/null 2>&1; then
@kezhenxu94
kezhenxu94 / Dockerfile.agent.diff
Created July 3, 2020 05:35
Speed up locally test of SkyWalking Python
--- a/tests/plugin/docker/Dockerfile.agent
+++ b/tests/plugin/docker/Dockerfile.agent
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-FROM python:3.7
+FROM kezhenxu94/python3-grpc
@kezhenxu94
kezhenxu94 / ts-worker.ts
Created June 12, 2020 14:17
NodeJS worker with TypeScript
/*!
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@kezhenxu94
kezhenxu94 / logger.sh
Created July 14, 2019 15:01
find out classes that have a different logger name
#!/bin/sh
# a wrong logger name is confusing when debugging
# this script will find out those classes that have
# a different logger name
find . -type f -print0 |
while IFS= read -r -d $'\0' file; do
if [[ ${file} =~ .java$ ]]; then
gawk 'BEGIN {
@kezhenxu94
kezhenxu94 / Generated.kt
Last active April 26, 2018 10:08
Generated code
data class T(
val currentUserUrl: String, //https://api.github.com/user
val currentUserAuthorizationsHtmlUrl: String, //https://github.com/settings/connections/applications{/client_id}
val authorizationsUrl: String, //https://api.github.com/authorizations
val codeSearchUrl: String, //https://api.github.com/search/code?q={query}{&page,per_page,sort,order}
val commitSearchUrl: String, //https://api.github.com/search/commits?q={query}{&page,per_page,sort,order}
val emailsUrl: String, //https://api.github.com/user/emails
val emojisUrl: String, //https://api.github.com/emojis
val eventsUrl: String, //https://api.github.com/events
val feedsUrl: String, //https://api.github.com/feeds