This file contains hidden or 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 gevent | |
| from gevent.subprocess import Popen, PIPE | |
| import sys | |
| def run(cmd,name="",index=1,color=True): | |
| fc = 32 + index%5 | |
| if name: |
This file contains hidden or 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
| [Desktop Entry] | |
| Exec=python /home/zhangclb/oss/ulipad/UliPad.pyw | |
| Name=UliPad | |
| Path=/home/zhangclb/oss/ulipad/ | |
| StartupNotify=true | |
| Terminal=false | |
| Type=Application | |
| X-KDE-SubstituteUID=false | |
| Icon=/home/zhangclb/oss/ulipad/ulipad.ico |
This file contains hidden or 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 re | |
| import os | |
| import sys | |
| import shutil | |
| import types | |
| import time | |
| import socket |
This file contains hidden or 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 gevent | |
| from gevent.server import StreamServer | |
| from gevent.queue import Queue | |
| import json | |
| def sendmsg2fobj(fobj,msg): |
This file contains hidden or 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
| from gevent.pywsgi import WSGIServer | |
| def application(environ, start_response): | |
| status = '200 OK' | |
| headers = [ | |
| ('Content-Type', 'text/html') | |
| ] | |
| start_response(status, headers) |
This file contains hidden or 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 | |
| MANIFEST_HEADER = r'''<?xml version="1.0" encoding="UTF-8"?> | |
| <manifest> | |
| <remote fetch="https://github.com/" name="github" review="review.cyanogenmod.org"/> | |
| <default remote="github" revision="refs/heads/cm-10.2"/> | |
| ''' |
This file contains hidden or 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 model = avalon.define("test", function(vm) { | |
| vm.array =[] | |
| }) | |
| $.ajax({ | |
| type:"GET", | |
| url:"xxx", | |
| success:function(json){ | |
| model.array = json.list || [] | |
| } | |
| }) |
This file contains hidden or 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 | |
| #----config part---- | |
| INIT_CMDS = ["iptables -F",#clean all | |
| "iptables -X", | |
| "iptables -t nat -F", | |
| "iptables -t nat -X", | |
| "iptables -P INPUT DROP",#forbid all | |
| "iptables -A INPUT -i lo -j ACCEPT"#accept all localhost |
NewerOlder