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
#!/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 | |
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
<html> | |
<head> | |
<title>CS_ProxyJudge ver 1.0</title> | |
</head> | |
<body bgcolor="#808080"> | |
<font color="#FFFFFF"><B> | |
<PRE> | |
<? | |
//======================================================================= | |
// 修改记录: |
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
# -*- coding: utf-8 -*- | |
# | |
# Copyright(c) 2010 poweredsites.org | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may | |
# not use this file except in compliance with the License. You may obtain | |
# a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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
# jsonParser.py | |
# | |
# Implementation of a simple JSON parser, returning a hierarchical | |
# ParseResults object support both list- and dict-style data access. | |
# | |
# Copyright 2006, by Paul McGuire | |
# | |
# Updated 8 Jan 2007 - fixed dict grouping bug, and made elements and | |
# members optional in array and object collections | |
# |
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
# -*- encoding: utf-8 -*- | |
# author: binux<17175297.hk@gmail.com> | |
import re | |
import time | |
import json | |
import requests | |
class BaiduFanYiAPI(object): | |
""" |
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/python | |
# -*- coding: utf-8 -*- | |
''' | |
Created on 2011-6-7 | |
Modified on 2011-11-22 | |
a diff function base on Advanced Dynamic Programming | |
http://www.avatar.se/molbioinfo2001/dynprog/adv_dynamic.html | |
@author: binux |
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
class AsyncProcessMixin(object): | |
def call_subprocess(self, func, callback=None, args=[], kwargs={}): | |
self.ioloop = tornado.ioloop.IOLoop.instance() | |
self.pipe, child_conn = Pipe() | |
def wrap(func, pipe, args, kwargs): | |
try: | |
pipe.send(func(*args, **kwargs)) | |
except Exception, e: | |
logging.error(traceback.format_exc()) |
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 | |
# -*- coding:utf-8 -*- | |
import sys | |
import time | |
import Queue | |
import threading | |
import traceback | |
class ExitException(Exception): |