Skip to content

Instantly share code, notes, and snippets.

View killme2008's full-sized avatar
🎯
Focusing

dennis zhuang killme2008

🎯
Focusing
View GitHub Profile
@killme2008
killme2008 / CreateTablesTest.java
Last active May 2, 2024 16:03
Test creating 100k tables in greptimedb
package com.greptime;
import static org.junit.Assert.assertTrue;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;
Greptime, Inc. Contributor License Agreement
Thank you for your interest in the open source project(s) managed by Greptime, Inc. (“Greptime”). In order to clarify the intellectual property license granted with Contributions from any person or entity, Greptime 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 Greptime 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 Greptime. In return, Greptime shall consider Your Contributions for addition to the official Greptime open source project(s) for which they were submitted. Except for the license granted herein to Greptime and recipients of software distributed by Greptime, Yo
@killme2008
killme2008 / jd.md
Last active November 3, 2017 05:11
Job Description

岗位描述:

蚂蚁中间件团队是服务于整个蚂蚁金服集团(包括钱包、网商、小贷、芝麻、聚宝、国际、口碑等)的核心技术团队,致力于打造支撑每秒亿级金融交易规模的基础中间件平台,为高速发展的业务提供业界一流的,金融级高可用高性能的分布式基础服务,也将十年磨一剑的技术做产品化输出,为蚂蚁业务生态的合作伙伴提供技术赋能。期待您的加入,一起在蚂蚁这个极具挑战和丰富多彩的业务舞台上玩技术,支撑 DT 驱动的互联网金融生态!

您将参与蚂蚁 Java 中间件(包括RPC通讯、消息队列、应用容器、开发框架、协调管控系统、数据中间件、搜索平台等)的高可用设计、核心编码、性能优化和产品化开发等工作。 岗位要求:

  1. 3年以上 JAVA 开发经验,有并发编程经验,熟悉文件I/O,网络 I/O 及类加载等机制细节;
  2. 有大规模分布式系统或者类库的研发经验,熟悉开源中间件,深入了解实现机制;
  3. 熟悉JVM基础知识,具有一定的调优经验和内存、线程相关问题排查经验;
@killme2008
killme2008 / pipe.c
Created November 2, 2017 16:09
Simple pipe example
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
int main(int argc, char *argv[])
{
int pp[2];
int pid;
char* word;
@killme2008
killme2008 / HashSetTest.java
Created October 10, 2017 14:39
concurrent test for hashset on JDK8
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.concurrent.CyclicBarrier;
public class HashSetTest {
private static Set<String> set = new HashSet<String>();
public static boolean update(final Set<String> subList) {
@killme2008
killme2008 / server.lm
Created October 9, 2017 11:37
Echo server in lemon lang.
import 'socket';
var ss = socket.socket(socket.AF_INET, socket.SOCK_STREAM);
socket.bind(ss, 8080);
socket.listen(ss);
while(true) {
var s = socket.accept(ss);
var msg = socket.recv(s[0]);
while(msg.trim() != "exit") {
socket.send(s[0], msg);
@killme2008
killme2008 / WordCountApplication.java
Created September 9, 2017 06:51
kafka streams workdcount example
package org.apache.kafka.example;
import org.apache.kafka.common.serialization.Serdes;
import org.apache.kafka.streams.KafkaStreams;
import org.apache.kafka.streams.StreamsConfig;
import org.apache.kafka.streams.kstream.KStream;
import org.apache.kafka.streams.kstream.KStreamBuilder;
import org.apache.kafka.streams.kstream.KTable;
import java.util.Arrays;
import org.bson.Document;
import com.mongodb.MongoClient;
import com.mongodb.client.MongoCollection;
import com.mongodb.client.MongoDatabase;
public class MongodbTest {
public static void main(String args[]) throws Exception {
@killme2008
killme2008 / sfn.clj
Last active June 2, 2017 08:29
A macro to refer java static method
(defmacro sfn
"A macro that wraps java static method into a function, for example:
((sfn Integer/valueOf) \"1\")
(map (sfn Math/sqrt) [1,2,3])
(map (sfn Math/pow.2) (range 1 10) (range 1 10))
The java static method passed in must be in the form of
'Class/Method.arity'. If '.arity' is not present, it's 1 by default.
"
@killme2008
killme2008 / Rakefile
Last active May 15, 2017 03:43
周报 Rake task
# coding: utf-8
# Description: 用于生成周报模板
## 将本文件保存为 Rakefile,放在存放周报的目录。
## 在周报目录创建一个名为 .title 的文件,设置标题,例如 『存储与网站工作周报』,用于设置标题,如果没有提供,默认为『工作周报』。
## 命令:
## rake new -- 创建周报
## rake clean -- 删除周报
task default: %w[new]