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 _*_ | |
""" | |
s0. dump fully event collection by getProfile 得出所有登录过的注册用户的埋点 | |
s1. run this programm | |
""" | |
from pymongo import MongoClient | |
from bson.objectid import ObjectId |
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 10 columns, instead of 9 in line 2.
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
/signup$,POST,,signupSuccess,,channel,from,,_id,type | |
/signup/qq,POST,,signupSuccess,,channel,from,,_id,type | |
/login$,POST,,loginSuccess,,,,_id,type | |
/login/qq,POST,,loginSuccess,,,,_id,type | |
/bind/qq,PUT,,bindQQSuccess,,,,_id | |
/unbind/qq,PUT,,unbindQQSuccess,,,, | |
/logout,POST,,logoutSuccess,,,, | |
/user/password$,PUT,,modifyPassword,,,,_id | |
/me$,PUT,,updateProfile,,**,, | |
/me$,GET,,getProfile,,,,_id,allowed,partialOpen |
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 re | |
from pymongo import MongoClient | |
from bson.objectid import ObjectId | |
import time | |
import datetime | |
from pyqqwry.qqwry import QQWry | |
qq_wry = QQWry("./qqwry.dat") |
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 re | |
from pymongo import MongoClient | |
from bson.objectid import ObjectId | |
import jwt | |
import time | |
import datetime | |
# TODO: change mongo env as online configure |
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 -*- | |
#!/usr/bin/env python | |
import os, urllib2, sys | |
import datetime | |
import random | |
import subprocess | |
import smtplib | |
from email.mime.text import MIMEText |
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
"use strict"; | |
import mongoose from 'mongoose'; | |
const EventAuto = mongoose.model('EventAuto'); | |
const autoEventsProxy = "http://localhost:8080/v3_6/autoevents/"; | |
const request = require('request').defaults({ | |
json: true | |
}); |
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 _*_ | |
""" | |
该脚本的gist地址 https://gist.github.com/diggzhang/480bf81101173525cc55926e990f8858 | |
关联脚本1: cronjob 备份 https://gist.github.com/diggzhang/cc0326d54bb592a0b2d7d7170fb94a17 | |
在跑这个脚本前最好建立索引 | |
db.httplogs.ensureIndex({ | |
"url": 1, | |
"method": 1, | |
"status": 1 |
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 _*_ | |
""" | |
该脚本用户修改表每日更新备份状态 | |
""" | |
from pymongo import MongoClient | |
import sys | |
import datetime |
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
object FileMatcher { | |
private def fileHere = (new java.ui.File(".")).listFiles | |
def filesMatching( | |
matcher: (String) => Boolean) = { | |
for(file <- filesHere; if matcher(file.getName)) | |
yield file | |
} |
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 _*_ | |
from __future__ import print_function | |
from pymongo import MongoClient | |
import datetime | |
import time | |
db = MongoClient('10.8.8.111', 27017)['eventsV4'] | |
events = db['eventV4'] | |
# 指定时间范围 |