Skip to content

Instantly share code, notes, and snippets.

<html>
<head><title>this is test page title</title>
<meta property="og:title" content="this is title from og title"/>
<meta property="og:description" content="this is description"/>
<meta property="og:type" content="article"/>
<meta property="og:url" content="http://static.palmchat.im/mytest.html"/>
<meta property="og:image" content="http://static.palmchat.im/source/new/mid_a43747788_1423822701.jpg"/>
</head>
<body>
this is page body
@jialechan
jialechan / demo.md
Last active February 26, 2016 06:14
fastjson自定义反序列化
public class LoginResponse {
    private UserInfo userInfo;
    ...
}
public class UserInfo {
    private List<String> attrList;
 ...
在某个路径下查找所有包含“hello abcserver”字符串的文件。
find /etc -name “*” | xargs grep “hello abcserver”
linux:
date -d @1466237560
mac:
时间戳转本地时间:
date -r 1354291200
本地时间转时间戳:
date -j -f "%Y-%m-%d %H:%M:%S" "2012-12-01 00:00:00" "+%s"
查看本地开放的端口
netstat -antp
检查nginx使用那个端口
netstat -plnt|grep nginx
检查某个进程使用那个端口
netstat -anp |grep 33333
遍历每个目录大小
List<String> groupIdList = JSON.parseObject(JSONObject.parseObject(responseStr).getJSONArray("list").toJSONString(), new TypeReference<List<String>>(){});
input {
        redis {
                host => "127.0.0.1"
                type => "redis-A" #原json不能有type关键字,类似的关键字还有index,id,score,source
                port => "6379"
                data_type => "list" # If redis_type is list, then we will BLPOP the key
                db => 0
                key => "palmplay_push_show2"

查找用户

接口说明

根据用户国家,年纪,身高,是否结婚等条件过滤查找用户

定义

curl 'http://localhost:49494/admin/ad/create' -H 'Content-Type:application/json' -X POST -d \
'{
    "promotionType": "APP_POP_ADS",
@jialechan
jialechan / application.yml
Created September 30, 2017 09:56
LogAnalytics application.yml example
core:
logPath: /Users/jialechan/idesWorkspaces/LogAnalytics/src/test/resources/
hostList:
- sitelog
mail:
mailTitle: 服务器请求日报
senderHost: smtp.qiye.xxx.com
senderUsername: [email protected]
senderPassword: xxx