Skip to content

Instantly share code, notes, and snippets.

View binux's full-sized avatar

Roy Binux binux

View GitHub Profile
@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 / 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 / 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() {
var _map = R;
var rectangle = new google.maps.Rectangle({
bounds: _map.getBounds(),
editable: true,
map: _map
});
function message(msg) {
$('#plexts').append('<div class="plext"><div class="pl_timestamp">'+(new Date()).getHours()+':'+(new Date()).getMinutes()+'</div><div class="pl_content pl_player"><span class="ALIENS">System: </span>'+msg+'</div></div>');
$('#plext_container').scrollTop($('#plext_container')[0].scrollHeight);
@binux
binux / portal_info.js
Last active December 11, 2015 22:39
function message(msg) {
$('#plexts').append('<div class="plext"><div class="pl_timestamp">'+(new Date()).getHours()+':'+(new Date()).getMinutes()+'</div><div class="pl_content pl_player"><span class="ALIENS">System: </span>'+msg+'</div></div>');
$('#plext_container').scrollTop($('#plext_container')[0].scrollHeight);
}
google.maps.event.addListener(Z.c().h, 'rightclick', function(event) {
message('@'+event.latLng.Ya+', '+event.latLng.Za);
});
U.prototype._show = U.prototype.show;
@binux
binux / selector.js
Last active December 14, 2015 04:19
function binux_init() {
var bdiv = document.createElement('div');bdiv.id = 'binux-overlay';bdiv.setAttribute('style', 'display: none;');
(document.body || document.documentElement).appendChild(bdiv);
function getOffset(elem) {
var top = 0;
var left = 0;
do {
if ( !isNaN( elem.offsetLeft) ) left += elem.offsetLeft;
if ( !isNaN( elem.offsetTop) ) top += elem.offsetTop;
@binux
binux / pinterest.py
Last active December 10, 2016 12:04
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<i@binux.me>
# http://binux.me
# Created on 2013-03-02 20:47:08
import os
import re
import sys
@binux
binux / imgurl.py
Last active December 14, 2015 10:19
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<i@binux.me>
# http://binux.me
# Created on 2013-03-02 19:50:18
import os
import re
import sys
@binux
binux / img_share.py
Last active December 14, 2015 10:58
#!/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-12-15 16:11:13
import re
import json
import os.path
@binux
binux / gplus.gs
Last active December 14, 2015 17:39
Google App Script of reader2plus A script record user's Google reader starred items as activities.
//
// 1. Depoly as web app (https://developers.google.com/apps-script/execution_web_apps#deploying)
// 2. register as web app through the APIs Console (https://code.google.com/apis/console#access)
// 3. add 'client_id', 'client_secret' to project properties.
// 4. If published to anyone else, make sure they access to the code. (https://developers.google.com/apps-script/execution_time_triggers)
//
var script_url = ScriptApp.getService().getUrl();
var client_id = ScriptProperties.getProperty('client_id');
var client_secret = ScriptProperties.getProperty('client_secret');