Skip to content

Instantly share code, notes, and snippets.

View aoxu's full-sized avatar

Ao Xu aoxu

View GitHub Profile
@cjybyjk
cjybyjk / douban-banned-user-check.js
Last active February 16, 2021 04:21
检查在 豆瓣《2015年中央电视台春节联欢晚会》 的短评中有多少打一星的用户被封号
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://movie.douban.com/subject/26323782/*
// @grant GM_xmlhttpRequest
// ==/UserScript==
#!/usr/bin/env python2
# lrdcq
# usage python2 unwxapkg.py filename
import sys, os
import struct
class WxapkgFile(object):
nameLen = 0
var CryptoJS = require('crypto-js')
var request = require('request-promise')
/*
* npm install crypto-js request-promise request
* node wx_t1t_hack.js
*/
// export function testEncription(msg, fullKey) {
// var fullKey = fullKey.slice(0, 16)
@lerry
lerry / mm.go
Created October 30, 2017 07:55
package main
import (
"io"
"os"
"fmt"
"sync"
"strconv"
"strings"
//飞船燃料
["600301"] = {robotIndex = 6003, ignoreGravity = true, ignoreContactSpace = true, updateFixture = true,
basic = { health = 50, attack = 1, defense = 0, },
resource = { shipEnergy = 5},
activate = {location = {x = 0.3, y = 1, valueType = "float"}, fixDirection = "right"},
zChase = {
[1] = {
target = {
target = "pathCollision",
},
@SaulLawliet
SaulLawliet / eleme.py
Last active January 11, 2022 09:22
查询饿了么品牌馆中有哪些是 <真·五折>
# coding: utf-8
import json
import re
import requests
# 替换成你自己的经纬度数据
# 查询方式 打开饿了么官网 -> 开发者模式 -> 输入送餐地址 -> 观察请求 -> 找到经纬度数据
latitude = 31.23978
longitude = 121.49968
@cqnature
cqnature / gist:c4c4d7da8ef003f74f969a59aaa9c8e8
Created January 7, 2017 09:49
品质技能配置示例
--宠物配置解析配置
monster = {
id = 1, name = "2", defaultGrade = 3, defaultLevel = 4, general = 5, group = 6,
additionAttack = 7,
skills = {id = 8, maxLevel = 9},
class = "10", order = 11,
qualitySkill = {id = 12}, --新增品质技能id
},
214,Helper,2,1,1,2081,0.2,266,15,SingleAttack,15,297 --最后一项是品质技能id
anonymous
anonymous / redis.log
Created November 26, 2016 10:04
redis日志片段
[1841] 24 Nov 17:29:43.025 * 1 changes in 900 seconds. Saving...
[1841] 24 Nov 17:29:43.026 * Background saving started by pid 23387
[23387] 24 Nov 17:29:43.026 # Failed opening .rdb for saving: Permission denied
[1841] 24 Nov 17:29:43.126 # Background saving error
[1841] 24 Nov 17:29:48.357 # Failed opening .rdb for saving: Permission denied
[1841] 24 Nov 17:29:48.357 # Failed opening .rdb for saving: Permission denied
[1841] 24 Nov 17:29:49.040 * 1 changes in 900 seconds. Saving...
[1841] 24 Nov 17:29:49.041 * Background saving started by pid 23390
[23390] 24 Nov 17:29:49.807 * DB saved on disk
[23390] 24 Nov 17:29:49.807 * RDB: 32 MB of memory used by copy-on-write
# 你可以从该 URL 下载这个配置文件: http://surge.run/config-example/ios.conf
# 用编辑器编辑后,再通过 iTunes, URL, AirDrop 或者 iCloud Drive 复制回 iOS 设备
# Version 2.0
[General]
# 日志等级: warning, notify, info, verbose (默认值: notify)
loglevel = notify
# 跳过某个域名或者 IP 段,这些目标主机将不会由 Surge Proxy 处理。(在 macOS
# 版本中,如果启用了 Set as System Proxy, 那么这些值会被写入到系统网络代理
# 设置中.)
@eladnava
eladnava / mongodb-s3-backup.sh
Last active March 11, 2024 10:21
Automatically backup a MongoDB database to S3 using mongodump, tar, and awscli (Ubuntu 14.04 LTS)
#!/bin/sh
# Make sure to:
# 1) Name this file `backup.sh` and place it in /home/ubuntu
# 2) Run sudo apt-get install awscli to install the AWSCLI
# 3) Run aws configure (enter s3-authorized IAM user and specify region)
# 4) Fill in DB host + name
# 5) Create S3 bucket for the backups and fill it in below (set a lifecycle rule to expire files older than X days in the bucket)
# 6) Run chmod +x backup.sh
# 7) Test it out via ./backup.sh