Skip to content

Instantly share code, notes, and snippets.

View BugenZhao's full-sized avatar

Bugen Zhao BugenZhao

View GitHub Profile
@BugenZhao
BugenZhao / RW_CLA
Created December 11, 2024 09:17 — forked from TennyZhuang/RW_CLA
RisingWave Labs, Inc. Contributor License Agreement
Thank you for your interest in the open source project(s) managed by RisingWave Labs, Inc. (“RisingWave Labs”). In order to clarify the intellectual property license granted with Contributions from any person or entity, RisingWave Labs must have a Contributor License Agreement (“CLA”) on file that has been signed by each contributor, indicating agreement to the license terms below. This license is for your protection as a contributor as well as the protection of RisingWave Labs and its other contributors and users; it does not change your rights to use your own Contributions for any other purpose.
By clicking “Accept” on this page You accept and agree to these terms and conditions for Your present and future Contributions submitted to RisingWave Labs. In return, RisingWave Labs shall consider Your Contributions for addition to the official RisingWave Labs open source project(s) for which they were submitted. Except for the license granted herein to RisingW
@BugenZhao
BugenZhao / a.txt
Created May 17, 2023 09:41
Kafka Simple Test
kafka-topics --create --bootstrap-server localhost:29092 --replication-factor 1 --partitions 4 --topic my-topic
create table t1 (v1 int, v2 varchar, t timestamptz as proctime()) with (
connector = 'kafka',
topic = 'my-topic',
properties.bootstrap.server = '127.0.0.1:29092',
scan.startup.mode = 'earliest'
) row format json;
create source s1 (v1 int, v2 varchar, t timestamptz as proctime()) with (
@BugenZhao
BugenZhao / example.sql
Created May 17, 2023 08:27
Flink Table Store Nexmark
CREATE TABLE datagen (
event_type int,
person ROW<
id BIGINT,
name VARCHAR,
emailAddress VARCHAR,
creditCard VARCHAR,
city VARCHAR,
state VARCHAR,
dateTime TIMESTAMP(3),
@BugenZhao
BugenZhao / dbserver1.inventory.t.json
Last active September 12, 2023 07:05
MySQL Debezium Examples
{
"schema": {
"type": "struct",
"fields": [
{
"type": "struct",
"fields": [
{
"type": "int32",
"optional": true,
@BugenZhao
BugenZhao / disable-ycbcr.base64
Last active February 19, 2023 04:07
PHL 279M1RV EDID macOS
AP///////wBBDFTCEjQOADAfAQS1PCJ4Iz1VrU9EtiYOUFS/zwBxT4HAgUCBgNHA0fyVALMATdAAoPBwPoAwIDUAVlAhAAAaAAAA/wBVSDAyMTQ4OTMwODM0AAAA/ABQSEwgMjc5TTFSVgogAAAA/QAweB7+bAEKICAgICAgAvMCAy7BUAEDBBITBRQfkAJdXl9gYT8jCQcHgwEAAGUDDAAgAOMF4wHmBgcBdnYXb8IAoKCgVVAwIDUAVlAhAAAehm+AoHA4QEAwIDUAVlAhAAAaVl4AoKCgKVAwIDUAVlAhAAAaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYHASeQAAAwEUmaABhP8OnwAvgD8Abwg9AAIABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEuQ
@BugenZhao
BugenZhao / extract.py
Created January 26, 2023 06:53
Extract PDF from Dark Horse Digital
from PIL import Image # pip3 install pillow
import tarfile
import json
# Suppose the book is at `https://digital.darkhorse.com/read/{hex}`,
# then visit `https://digital.darkhorse.com/api/v6/book/{hex}` to get the tarball.
book = tarfile.open('book.tar', mode='r')
manifest = json.load(book.extractfile('manifest.json'))
pages = []
thread '<unnamed>' panicked at 'unsupported clockid: 6', /home/bugenzhao/.cargo/registry/src/github.com-1ecc6299db9ec823/madsim-0.2.3/src/sim/time/system_time.rs:60:13
stack backtrace:
0: rust_begin_unwind
at /rustc/9067d5277d10f0f32a49ec9c125a33828e26a32b/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at /rustc/9067d5277d10f0f32a49ec9c125a33828e26a32b/library/core/src/panicking.rs:142:14
2: clock_gettime
at /home/bugenzhao/.cargo/registry/src/github.com-1ecc6299db9ec823/madsim-0.2.3/src/sim/time/system_time.rs:60:13
3: minstant::coarse_now::current_cycle
at /home/bugenzhao/.cargo/registry/src/github.com-1ecc6299db9ec823/minstant-0.1.2/src/coarse_now.rs:33:9
@BugenZhao
BugenZhao / discontinuous.rs
Last active August 10, 2022 12:58
discontinuous bytes
#![allow(dead_code)]
#[global_allocator]
static ALLOC: Jemalloc = Jemalloc;
use std::iter::repeat;
use bytes::Buf;
use criterion::black_box;
use criterion::{criterion_group, criterion_main, Criterion};
0: std::backtrace_rs::backtrace::libunwind::trace
at /rustc/bb8c2f41174caceec00c28bc6c5c20ae9f9a175c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: std::backtrace_rs::backtrace::trace_unsynchronized
at /rustc/bb8c2f41174caceec00c28bc6c5c20ae9f9a175c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: std::backtrace::Backtrace::create
at /rustc/bb8c2f41174caceec00c28bc6c5c20ae9f9a175c/library/std/src/backtrace.rs:328:13
3: risingwave_common::cache::Guard::new
at ./src/common/src/cache.rs:773:25
4: risingwave_common::cache::LruCache<K,T>::lookup_with_request_dedup::{{closure}}
at ./src/common/src/cache.rs:839:29
@BugenZhao
BugenZhao / c_cpp_properties.json
Last active April 20, 2020 06:55
IntelliSense configuration for Android kernel development
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"~/Android/kernel/goldfish/include",
"~/Android/kernel/goldfish/arch/arm/include"
],
"defines": [