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
#!/usr/bin/env bash | |
if [ ! $STY ]; then | |
screen -S $(basename $0 .sh) -U -d -m $0 $* | |
exit 0 | |
fi | |
if [ ! $LOCK ]; then | |
LOCK=$(echo $0 $* | md5sum | cut -f 1 -d " ").lock | |
fi |
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
#!/bin/bash | |
EMAIL=$1 | |
source vars | |
set -x | |
./pkitool $EMAIL | |
source sendca.sh |
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
#!/usr/bin/env bash | |
set -x | |
sleep 10 & | |
PID=$! | |
while kill -0 $PID | |
do | |
ps h -o pcpu,pmem -p $PID |
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
import sys | |
import codecs | |
sys.stdout = codecs.getwriter('utf8')(sys.stdout) |
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
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, |
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
// ==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== |
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
#!/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 |
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
#!/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() |
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
#!/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 |
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
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){ |