Skip to content

Instantly share code, notes, and snippets.

View xuqisheng's full-sized avatar
💭
happy

andy xuqisheng

💭
happy
  • Hang Zhou
View GitHub Profile
@willwhui
willwhui / Connect to Google Home
Created June 1, 2017 13:57
Connect to Google Home
Connect to Google Home
@theJian
theJian / ss-install.md
Created February 12, 2016 15:18 — forked from aa65535/ss-install.md
shadowsocks-libev install at Debian or CentOS

Debian

cd /tmp
# 下载源码
git clone https://github.com/madeye/shadowsocks-libev.git
# 开始编译
cd shadowsocks-libev
./autogen.sh
./configure --prefix=/usr && make
make install
@kevinkindom
kevinkindom / Python Socket 编程详细介绍.md
Last active September 15, 2024 14:52
Python Socket 编程详细介绍

Python Socket 编程详细介绍

Python 提供了两个基本的 socket 模块:

  • Socket 它提供了标准的BSD Socket API。
  • SocketServer 它提供了服务器重心,可以简化网络服务器的开发。

下面讲解下 Socket模块功能。

Socket 类型

@sennajox
sennajox / slow_log_dump.py
Last active October 12, 2017 05:59
Convert the slowlog from table into logfile
#!/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)
@eric2323223
eric2323223 / applicationContext.xml
Created September 4, 2012 02:11
Sample spring embedded database configuration
<?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
">
@geowa4
geowa4 / install.sh
Created December 3, 2011 21:51
Simple Bash script to download Tomcat 7.0.23 and deploy a WAR.
#!/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