Skip to content

Instantly share code, notes, and snippets.

View VictoryWangCN's full-sized avatar
🤥
how's your sex life?

VictoryWangCN

🤥
how's your sex life?
  • Alibaba
  • China
View GitHub Profile
object L {
def main(args: Array[String]): Unit = {
val oneToTenList = (1 to 10).toList
val oneList = List(1)
assert("none" == checker(11)(oneToTenList))
assert("end of 10" == checker(10)(oneToTenList))
assert("contains 9" == checker(9)(oneToTenList))
assert("start with 1" == checker(1)(oneToTenList))
@VictoryWangCN
VictoryWangCN / mesos-starter.sh
Created September 6, 2017 08:51
Mesos Start(Copy)
#!/bin/bash
set -o errexit -o nounset -o pipefail
export LC_ALL=en_US.UTF-8
export HADOOP_HOME=/oneapm/local/hadoop-2.7.1/
MESOS_HOME=$(dirname $0)/..
LOG_DIR=/oneapm/log/mesos/console
CONFIG_FOLDER=/oneapm/etc/mesos
mkdir -p /oneapm/log/mesos/console
@VictoryWangCN
VictoryWangCN / ClickHouseDistributedSQLGen.cpp
Last active July 6, 2017 13:15
ClickHouse 的Distributed语句生成工具(从正常语句,自动生成Distributed)...不过是shit code..
#include <iostream>
#include <Parsers/ParserQueryWithOutput.h>
#include <Parsers/parseQuery.h>
#include <Parsers/formatAST.h>
#include <Parsers/ASTCreateQuery.h>
#include <Parsers/ASTSelectQuery.h>
#include <Parsers/ParserQuery.h>
#include <Parsers/ParserCreateQuery.h>
#include <Parsers/ASTTablesInSelectQuery.h>
@VictoryWangCN
VictoryWangCN / DumpClassURL.java
Created August 16, 2016 04:36 — forked from rednaxelafx/DumpClassURL.java
Using the ProtectionDomain of an InstanceKlass to see where it was loaded from
import java.io.*;
import java.util.*;
import sun.jvm.hotspot.memory.*;
import sun.jvm.hotspot.oops.*;
import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.runtime.*;
import sun.jvm.hotspot.tools.*;
public class DumpClassURL extends Tool {
public void run() {