Skip to content

Instantly share code, notes, and snippets.

View ymjing's full-sized avatar

Yiming Jing ymjing

  • Google
  • Mountain View, CA
View GitHub Profile
@ymjing
ymjing / Monaco for Powerline.md
Last active March 24, 2022 14:34
Powerline-patched Monaco for Windows and OSX

Powerline-patched Monaco for Windows and OSX

This font is manually patched with Fontforge. It includes the glyphs from DejaVu Sans Mono for Powerline.

I recommend DirectWrite-patched VIM builds. I'm using KaoriYa's build (http://www.kaoriya.net/software/vim/)

Usage

Add the following lines to your .vimrc/_vimrc:

@ymjing
ymjing / update_auth_users.c
Last active May 9, 2016 22:36
A buggy C code snippet
bool update_auth_users(
auth_users_t *db,
uint32_t group,
uint32_t user_token,
bool is_removal,
uint32_t *ret
) {
uint32_t count = 0;
uint32_t index = 0;
uint32_t *p = NULL;
@ymjing
ymjing / keybase.md
Last active September 19, 2019 16:28

Keybase proof

I hereby claim:

  • I am ymjing on github.
  • I am bincat (https://keybase.io/bincat) on keybase.
  • I have a public key whose fingerprint is 9A39 188C 7A4B B0F4 95B3 87A1 166D 2911 B608 DDA9

To claim this, I am signing this object:

@ymjing
ymjing / mesalink_release_v0.6.0_chn.md
Last active April 3, 2019 08:03
MesaLink v0.6.0 released [Chinese version]
@ymjing
ymjing / server.chain
Created December 11, 2018 02:36
gmSSL测试证书
-----BEGIN CERTIFICATE-----
MIIBlzCCAT2gAwIBAgIBezAKBggqgRzPVQGDdTAcMRowGAYDVQQDDBFwb255dG93
biBFQ0RTQSBDQTAeFw0xODEwMzEyMjM5MjBaFw0yODEwMjgyMjM5MjBaMC4xLDAq
BgNVBAMMI3Bvbnl0b3duIEVDRFNBIGxldmVsIDIgaW50ZXJtZWRpYXRlMFkwEwYH
KoZIzj0CAQYIKoEcz1UBgi0DQgAEtX14QC2vgtRY0LStwf3twD2GEY31WSoUvFwz
p8v6TEg7cKIK0tL6vre7+VpDvderu6BfHHwUSPhc2vC1xgy8N6NeMFwwHQYDVR0O
BBYEFONwGAhAdN54F6oXJ3zgDtMEAVTlMCAGA1UdJQEB/wQWMBQGCCsGAQUFBwMB
BggrBgEFBQcDAjAMBgNVHRMEBTADAQH/MAsGA1UdDwQEAwIB/jAKBggqgRzPVQGD
dQNIADBFAiBv5hx95PjodlJnYSJmn42eZXpP51DE5Ef7bn42GGAKjAIhALUhyNW+
zDNbcjHspcU524DIMw1G1fDeo0kHzjSZuOcJ
@ymjing
ymjing / mesalink_1.0_brpc_ssl_benchmark.md
Last active April 2, 2019 19:26
MesaLink 1.0.0 vs OpenSSL 1.1.1b
@ymjing
ymjing / brpc_bench.md
Created May 8, 2019 18:47
Benchmarking a bRPC http service

http_server.cpp

// Copyright (c) 2014 Baidu, Inc.
// 
// Licensed 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
// 
@ymjing
ymjing / brpc_async_bench.md
Created May 8, 2019 21:36
Benchmarking a bRPC async http service

http_async_server.cpp

// Copyright (c) 2014 Baidu, Inc.
// 
// Licensed 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
@ymjing
ymjing / baidu_xlab.md
Last active June 4, 2019 18:20
Baidu X-Lab description

Baidu X-Lab is the research lab developing the core security capabilities across Baidu’s products and services. The team focuses on the areas of next-generation security architectures, open-source security infrastructures, ecosystem cooperation and more. X-Lab has made outstanding achievements, which have been recognized globally by Internet software vendors, service providers, as well as international security communities. The X-Lab has released several open source Rust projects: MesaTEE Rust SGX SDK, MesaLock Linux, MesaLink TLS and so on.

@ymjing
ymjing / Cargo.toml
Created June 14, 2019 23:25
A simple brpc-rs service
[package]
name = "brpc_server_demo"
version = "0.1.0"
edition = "2018"
build = "build.rs"
[dependencies]
brpc-sys = { path = "../brpc-sys" }
cc = "1.0.37"