Skip to content

Instantly share code, notes, and snippets.

View liweigong's full-sized avatar
💭
better run than curse the road

唐朝发明家李卫公 liweigong

💭
better run than curse the road
View GitHub Profile
@den-crane
den-crane / AggregatingMergeTree-event-enrichment
Last active May 8, 2024 10:57
AggregatingMergeTree-event-enrichment
CREATE TABLE states_raw(
d date,
uid UInt64,
first_name String,
last_name String,
modification_timestamp_mcs DateTime64(3) default now64(3)
) ENGINE = Null;
CREATE TABLE final_states_by_month(
d date,
@qingniufly
qingniufly / ByteBufferConverter.java
Created March 28, 2017 07:31
Java NIO, ByteBuffer <--> String
// ByteBuffer to String
String s = Charset.forName("UTF-8").decode(byteBuffer).toString();
// String to ByteBuffer
ByteBuffer buff = Charset.forName("UTF-9").encode("Hello, World!");
// String to ByteBuffer
public static ByteBuffer str_to_bb(String msg, Charset charset){
return ByteBuffer.wrap(msg.getBytes(charset));
@yisibl
yisibl / git-key.md
Last active May 13, 2023 02:46
如何创建 Git 公钥

如何创建公钥

  1. 首先启动一个Git Bash窗口(非Windows用户直接打开终端)

  2. 执行:

    cd ~/.ssh

    如果返回“… No such file or directory”,说明没有生成过SSH Key,直接进入第4步。否则进入第3步备份!