Skip to content

Instantly share code, notes, and snippets.

View binux's full-sized avatar

Roy Binux binux

View GitHub Profile
@binux
binux / xf_magnet.js
Last active October 19, 2023 02:38
QQ旋风网页版,磁力链支持 书签: javascript:void((function(){var d=document;var s=d.createElement('script');s.src='http://blog.binux.me/assets/image/xf_magnet.js';s.id='binux_script';d.body.appendChild(s)})())
// vim: set et sw=2 ts=2 sts=2 ff=unix fenc=utf8:
// Author: Binux<i@binux.me>
// http://binux.me
// Created on 2013-01-21 20:18:42
jQuery.ajax({
url: 'http://pyproxy.duapp.com/http://httpbin.duapp.com/cookies/set?userid=21',
cache: true,
dataType: 'script',
success: function() {
@binux
binux / passcode.py
Created January 14, 2013 02:51
http://www.ingress.com/intel 登陆,提取cookie填入cookie变量中
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<1@binux.me>
# http://binux.me
# Created on 2013-01-14 10:29:51
import re
import cPickle
import requests
@binux
binux / fake_gps.js
Last active December 10, 2015 23:28
var marker = new google.maps.Marker({
position: new google.maps.LatLng(Z.d().h.getCenter().Ya, Z.d().h.getCenter().Za),
draggable: true,
map: Z.d().h
});
var STEP = 0.000163;
function goto(a,b) {
GOTO_a = a; GOTO_b = b;
}
@binux
binux / playlist.js
Created November 16, 2012 14:32
playlist for moe.fm
var _playlist = [];
var _next = '';
var _loading = false;
var _loaded = false;
var _current = 0;
function _load_more() {
if (_loading) return;
_loading = true;
$.get(_next, function(result){
@binux
binux / rewrite.py
Created September 7, 2012 04:25
web proxy http links rewrite
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<17175297.hk@gmail.com>
# http://binux.me
# Created on 2012-09-06 22:22:21
import urlparse
import re
@binux
binux / basedb.py
Created August 30, 2012 12:28
basedb for sqlite
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<17175297.hk@gmail.com>
# http://binux.me
# Created on 2012-08-30 17:43:49
import logging
logger = logging.getLogger()
@binux
binux / google_image_search.py
Created August 13, 2012 07:46
search for a larger size of image
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<17175297.hk@gmail.com>
# http://binux.me
# Created on <T_CREATE_DATE>
import sys
import re
import requests
@binux
binux / TLE.user.js
Created July 19, 2012 07:42
export thunder lixian url to aria2/wget
// ==UserScript==
// @name ThunderLixianExporter
// @namespace http://binux.me/
// @version 0.1
// @description export thunder lixian url to aria2/wget
// @match http://dynamic.cloud.vip.xunlei.com/user_task?*
// @run-at document-end
// @copyright 2012+, You
// ==/UserScript==
@binux
binux / aria2jsonrpc.js
Created July 15, 2012 13:09
aria2 jsonrpc client
var ARIA2 = (function() {
var jsonrpc_version = '2.0';
function get_auth(url) {
return url.match(/^(?:(?![^:@]+:[^:@\/]*@)[^:\/?#.]+:)?(?:\/\/)?(?:([^:@]*(?::[^:@]*)?)?@)?/)[1];
};
function request(jsonrpc_path, method, params) {
var request_obj = {
jsonrpc: jsonrpc_version,
@binux
binux / encode_fix.py
Created April 24, 2012 11:20
fix encoding for unicode in term.
import sys
import codecs
sys.stdout = codecs.getwriter('utf8')(sys.stdout)