Python 提供了两个基本的 socket 模块:
Socket它提供了标准的BSD Socket API。SocketServer它提供了服务器重心,可以简化网络服务器的开发。
下面讲解下 Socket模块功能。
| #!/bin/bash | |
| TOMCAT=apache-tomcat-7.0.23 | |
| TOMCAT_WEBAPPS=$TOMCAT/webapps | |
| TOMCAT_CONFIG=$TOMCAT/conf/server.xml | |
| TOMCAT_START=$TOMCAT/bin/startup.sh | |
| TOMCAT_ARCHIVE=$TOMCAT.tar.gz | |
| TOMCAT_URL=http://apache.mirrorcatalogs.com/tomcat/tomcat-7/v7.0.23/bin/$TOMCAT_ARCHIVE | |
| WAR_FILE=whatever.war |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <beans xmlns="http://www.springframework.org/schema/beans" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xmlns:jdbc="http://www.springframework.org/schema/jdbc" | |
| xmlns:tx="http://www.springframework.org/schema/tx" | |
| xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | |
| http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd | |
| http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd | |
| "> |
| #!/usr/bin/env python2 | |
| """ | |
| Queries the slowlog database table and outputs it in | |
| the normal MySQL slow log text format. | |
| Run this script by: | |
| python /path/to/slow_log_dump.py dbip dbport dbusr dbpwd [start_time] [end_time] > /path/to/slow_log_dump.log | |
| Then you can run the normal mysqldumpslow parser on the output file (slow_log_dump.log) |
Debian
cd /tmp
# 下载源码
git clone https://github.com/madeye/shadowsocks-libev.git
# 开始编译
cd shadowsocks-libev
./autogen.sh
./configure --prefix=/usr && make
make install| Connect to Google Home |