Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

dennis zhuang killme2008

🎯
Focusing
View GitHub Profile
@killme2008
killme2008 / jd.md
Last active Nov 3, 2017
Job Description
View jd.md

岗位描述:

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

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

  1. 3年以上 JAVA 开发经验,有并发编程经验,熟悉文件I/O,网络 I/O 及类加载等机制细节;
  2. 有大规模分布式系统或者类库的研发经验,熟悉开源中间件,深入了解实现机制;
  3. 熟悉JVM基础知识,具有一定的调优经验和内存、线程相关问题排查经验;
@killme2008
killme2008 / pipe.c
Created Nov 2, 2017
Simple pipe example
View pipe.c
#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 Oct 10, 2017
concurrent test for hashset on JDK8
View HashSetTest.java
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 Oct 9, 2017
Echo server in lemon lang.
View server.lm
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 Sep 9, 2017
kafka streams workdcount example
View WordCountApplication.java
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;
View MongodbTest.java
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 Jun 2, 2017
A macro to refer java static method
View sfn.clj
(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
周报 Rake task
View Rakefile
# coding: utf-8
# Description: 用于生成周报模板
## 将本文件保存为 Rakefile,放在存放周报的目录。
## 在周报目录创建一个名为 .title 的文件,设置标题,例如 『存储与网站工作周报』,用于设置标题,如果没有提供,默认为『工作周报』。
## 命令:
## rake new -- 创建周报
## rake clean -- 删除周报
task default: %w[new]
View Test.java
public class Test {
private static int plusOne(int i) {
return ++i;
}
private static long oneForMethod(int x, int times) {
long start = System.nanoTime();
for (int i = 0; i < times; i++) {
@killme2008
killme2008 / ping_pong.ex
Last active Jan 6, 2017
Erlang process context switch test.
View ping_pong.ex
defmodule PingPong do
def test(n, m) do
parent = self()
spawn fn ->
s = :erlang.monotonic_time(:microsecond)
{cs1,_} = :erlang.statistics(:context_switches)
{r1, _} = :erlang.statistics(:reductions)
first = self()
last = start(first, n, m)