Skip to content

Instantly share code, notes, and snippets.

View intellecat's full-sized avatar
🌴
On vacation

geecat intellecat

🌴
On vacation
  • CatЯun
  • NZ
  • 10:58 (UTC +13:00)
View GitHub Profile
@intellecat
intellecat / request
Last active November 23, 2015 07:17
百度获取广告代码位配置的请求
Request URL:
http://pos.baidu.com/acom?di=u2113863&dcb=BAIDU_DUP2_define&dtm=BAIDU_DUP2_SETJSONADSLOT&dbv=0&dci=0&dri=0&dis=0&dai=1&dds=&drs=1&dvi=1444976201&ltu=http%3A%2F%2F98.baixing.com%2Fsz%2Fsiji%2F&liu=&ltr=&lcr=&ps=0x0&psr=375x667&par=375x667&pcs=375x627&pss=375x0&pis=-1x-1&cfv=0&ccd=24&chi=2&cja=true&cpl=0&cmi=0&cce=true&col=zh-CN&cec=UTF-8&cdo=-1&tsr=11&tlm=1448002476&tcn=1448262224&tpr=1448262223878&dpt=none&coa=&dpr=2&ti=58%E5%90%8C%E5%9F%8E%20-%20%E8%84%9A%E8%87%AD%E6%80%8E%E4%B9%88%E5%8A%9E&baidu_id=
Query params:
di:u1818098
dri:0
dis:0
dai:1
ps:285x-5
coa:rsi1=75&pat=10&scale=20.4
@intellecat
intellecat / request
Created November 23, 2015 07:15
百度获取广告代码位配置的请求
Request URL:http://pos.baidu.com/acom?di=u2113863&dcb=BAIDU_DUP2_define&dtm=BAIDU_DUP2_SETJSONADSLOT&dbv=0&dci=0&dri=0&dis=0&dai=1&dds=&drs=1&dvi=1444976201&ltu=http%3A%2F%2F98.baixing.com%2Fsz%2Fsiji%2F&liu=&ltr=&lcr=&ps=0x0&psr=375x667&par=375x667&pcs=375x627&pss=375x0&pis=-1x-1&cfv=0&ccd=24&chi=2&cja=true&cpl=0&cmi=0&cce=true&col=zh-CN&cec=UTF-8&cdo=-1&tsr=11&tlm=1448002476&tcn=1448262224&tpr=1448262223878&dpt=none&coa=&dpr=2&ti=58%E5%90%8C%E5%9F%8E%20-%20%E8%84%9A%E8%87%AD%E6%80%8E%E4%B9%88%E5%8A%9E&baidu_id=
<?php
'category=yiliao,meirong' => ['type'=>'ListingVirtual', 'billingName1'=>'30024088_12_cpr', 'channel1'=>16,'billingName2'=>'30024088_cpr' ],
'category=licaifuwu,lvxingshe' => ['type'=>'listingInsert', 'view'=>'listing4', 'billingName'=>'30024088_12_cpr', 'channel'=>6, 'billingName2'=>'30024088_6_cpr', 'divide'=>100, 'insertSize2'=>5, 'size'=>40],
'category==nongchanpin,menpiao,nongye,qiumai' => ['type'=>'listingInsert', 'billingName'=>'30024088_12_cpr', 'channel'=>1],
'category==ershouqiche,cheliang,xincheyouhui,shangpaiyanche,cheliangqiugou,qichebaoyang,daibanzhuce,gongchengche,ershoukache,daikuangouche' => ['type'=>'listingInsert', 'billingName'=>'30024088_12_cpr', 'channel'=>2],
'category==jingyingzhuanrang,shangpuchushou,qiufang' => ['type'=>'listingInsert', 'billingName'=>'30024088_12_cpr', 'channel'=>3],
'category==yule,qitafuwu,lipinfuwu,jinrongfuwu,jiameng,fuwu' => ['type'=>'listingInsert', 'billingName'=>'30024088_12_cpr', 'channel'=>5],
'category==jiaoyupeixun,wentipeixun,xiaoshou,chushi,wenmi,

上次收到的反UC广告代码是这样的:

<!-- head部分 -->
<script src="http://script.bd.baixing.net/cpro/ui/dm.js" type="text/javascript"></script>

<!-- u1502913 body部分 -->
<script type="text/javascript">
    (function() {
        var s = "_" + Math.random().toString(36).slice(2);
=====headers====== Array ( [0] => Authorization: oauth2 c728932ca66d7dad6842eeef0607e797 ) =====request info===== Array ( [url] => http://sandbox.api.haodai.com/xindai/get_xindai_list?source=open.haodai&auth=oauth2&ref=hd_1000&xd_type=qiye&city=shanghai&page=1&page_size=10&money=1&month=12 [content_type] => application/json;charset=utf-8 [http_code] => 200 [header_size] => 596 [request_size] => 310 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 0.697707 [namelookup_time] => 0.304713 [connect_time] => 0.307697 [pretransfer_time] => 0.307726 [size_upload] => 0 [size_download] => 24496 [speed_download] => 35109 [speed_upload] => 0 [download_content_length] => -1 [upload_content_length] => 0 [starttransfer_time] => 0.694036 [redirect_time] => 0 [redirect_url] => [primary_ip] => 61.172.238.153 [certinfo] => Array ( ) [primary_port] => 80 [local_ip] => 192.168.8.199 [local_port] => 55871 [request_header] => GET /xindai/get_xindai_list?source=open.haodai&auth=oauth2&ref=hd_1000&xd_ty
@intellecat
intellecat / gist:8094551
Last active January 1, 2016 04:49
jedi syntax doc
@intellecat
intellecat / gist:7766577
Created December 3, 2013 09:34
ganji_zufang pipe
var request = require('request'),
mongo = require('mongoskin'),
cheerio = require('cheerio');
var db = mongo.db('localhost:27017/nu-reader?auto_reconnect',{safe: true});
function fetch(param,callback) {
request(param.url,function (error, response, body) {
var $ = cheerio.load(body);
var items = [];
@intellecat
intellecat / gist:7729819
Created December 1, 2013 08:20
vanilla sql
# ************************************************************
# Sequel Pro SQL dump
# Version 4096
#
# http://www.sequelpro.com/
# http://code.google.com/p/sequel-pro/
#
# Host: 127.0.0.1 (MySQL 5.6.12)
# Database: garden
# Generation Time: 2013-12-01 08:18:05 +0000
@intellecat
intellecat / gist:3497497
Created August 28, 2012 11:53
Translates a number to a short alhanumeric version
function alphaID($in, $to_num = false, $pad_up = false, $passKey = null)
{
$index = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
if ($passKey !== null) {
// Although this function's purpose is to just make the
// ID short - and not so much secure,
// with this patch by Simon Franz (http://blog.snaky.org/)
// you can optionally supply a password to make it harder
// to calculate the corresponding numeric ID
@intellecat
intellecat / decode_douban_read_test
Created February 29, 2012 07:35
解密豆瓣阅读数据试验
//t是"加密"的内容,在gist里面看不到 其实就是"var t = {"data":"M6XaU5P4..."
var t = {"data":"M6XaU5P4g6Arj50sU5XkCVK1l9GeU5AsisAlu0kqTTgew2A0AFGkltoHASeswNOpT_VLB8l2CsNl\nAsasU5XkCVK4d9G0C2ArAsA0AFG63j8WUtJ4U5AsisAsnIX0CjOsisXPAsasg5TsltH4UtNsisAs\nnIXSU$84Cj84g6Arj50slwHaC2ArAFm1gRJFgRJadIA0ARG1ltQsiF0sltTOlIArA1V0ejgXuDky\nfVAabao9EwzBleGNL3bzbaoqtHUyuSkuzNrEuskgB$9$ycoHiTq3EcAlAsasCRK6UjJ4ASkxAFmL\n3RK0CIArCRJ0g$N0AFmLdj8vCj84ASkR3joWC2asgJKoljK4C2ArCRJ0g$N0AFmL3$TZltT6ASkR\n3joWC2aslJKkURGHUFzsiRC1UwPHL9VKnw0slwHaC2ArAFm1gRJFgRJadIA0ARG1ltQsiF0sltTO\nlIArA1VLN$ahC1K4c8lsuSGDa9mpbaoiVvx03ehq$NOhj$HUNASJNjTCYFkrySwbBXcm9OmU1VZC\nEcAlAsasCRK6UjJ4ASkxAFmL3RK0CIArCRJ0g$N0AFmLdj8vCj84ASkR3joWC2asgJKoljK4C2Ar\nCRJ0g$N0AFmL3$TZltT6ASkR3joWC2aslJKkURGHUFzsiRC1UwPHL9VKnw0slwHaC2ArAFm1gRJF\ngRJadIA0ARG1ltQsiF0sltTOlIArA1$q$Taq9cK$1JvhMFhIETgejOlURNOpUaXpzLfEMF7PsvOc\nusku6QOcuskRw5Wxbao9YJZwj8HinCS3Nh1i1vOw9FG$1JJXUNt3WRd4TAo6d34eukJssebCuskU\ndTpz3r1NQNxjleG$xFdQTWBbtHvhHSPf76cNAmG9EwzBAmzyJJE9LO8pEscNAmGbSHUKAmzyJJyh\n1I1HDV5MAmzyJ