This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding = utf-8 | |
import urllib2 | |
import copy | |
import time | |
import json | |
import sys | |
import getopt | |
# 下面的 corpid 和 corpsecret 需要从企业微信中获取 | |
ACCESS_TOKEN_URL = "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=TEST&corpsecret=TEST" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.huihui.stat; | |
import io.prometheus.client.CollectorRegistry; | |
import io.prometheus.client.Counter; | |
import io.prometheus.client.Histogram; | |
import io.prometheus.client.exporter.PushGateway; | |
import java.io.IOException; | |
import java.util.concurrent.ConcurrentHashMap; | |
import java.util.concurrent.ConcurrentMap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.xunlei; | |
/** | |
* Created by lvfei on 16/9/9. | |
*/ | |
@Path("/test") | |
public class HelloInterface { | |
@Name("id") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import redis.clients.jedis.exceptions.JedisConnectionException; | |
/** | |
* Created by lvfei on 16/8/1. | |
*/ | |
public class ParseTest { | |
public static void main(String[] args) { | |
byte[] buf = {'2', '0', '0', '0'}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) { | |
int[] array = new int[100]; | |
for (int j = 0; j < 20000; j++) { | |
int count = 0; | |
for (int i = 0; i < 100; i++) { | |
int index = (int) ((Math.random() * 10000) % 1000); | |
if (index < 400 - (count * 40) + i * 2) { | |
count++; | |
array[i]++; | |
if (count > 8){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<build> | |
<plugins> | |
<!-- The configuration of maven-jar-plugin --> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-jar-plugin</artifactId> | |
<version>2.4</version> | |
<!-- The configuration of the plugin --> | |
<configuration> | |
<!-- Configuration of the archiver --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private final static class Bucket | |
implements java.io.Serializable | |
{ | |
private static final long serialVersionUID = 1L; | |
public final Bucket next; | |
public final String key; | |
public final SettableBeanProperty value; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/data/local/tcpdump -s 0 -w - | busybox nc -l -p 11233 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ls | grep build_x86.sh | rm -rf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void HandleHeader(AsynIoOperation *pOperation) | |
{ | |
if (SUCCESS == result) | |
{ | |
if (!isContainBody) | |
{ | |
Reset(pOperation) | |
if (!allDataRecved) | |
{ | |
DoRecvData(pOperation); |
NewerOlder