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 -*- | |
""" | |
compare so files funcs | |
test pass : centos6.4_x64 | |
e-mail : mike_zhang@live.com | |
""" | |
import os |
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 | |
# | |
# chkconfig: 23 90 10 | |
# Description: Quickly hacked together bigcouch init script for CentOS systems. | |
. /etc/init.d/functions | |
PID_FILE=/var/run/bigcouch.pid | |
BIGCOUCH_BIN=/opt/bigcouch/bin/bigcouch | |
SUBSYS_LOCK_FILE=/var/lock/subsys/bigcouch |
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 | |
import paramiko | |
hostname = '192.168.1.1' | |
port = 22 | |
username = 'foo' | |
password = 'xxxYYYxxx' | |
if __name__ == "__main__": |
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 | |
import os | |
dir1 = "essays" | |
dir2 = "../tmp" | |
tmpBranchName = "other" | |
execCommand = os.system |
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 | |
# http://musta.sh/2012-03-04/twisted-tcp-proxy.html | |
import sys | |
from twisted.internet import defer | |
from twisted.internet import protocol | |
from twisted.internet import reactor | |
from twisted.python import log |
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
启动: | |
VBoxManage startvm CentOS6.3_64 -type vrdp | |
vbs代码: | |
Set ws = CreateObject("Wscript.Shell") | |
ws.run "cmd /c VBoxManage startvm CentOS6.3_64 -type vrdp",vbhide | |
休眠: | |
VBoxManage controlvm CentOS6.3_64 savestate |
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
# just in windows | |
import os | |
var = os.popen("wmic nicconfig get MACAddress").read() | |
#print var | |
macList = [] | |
for x in var.split(" \r\n"): | |
if len(x.strip()) > 0 and x.find("MACAddress"): | |
if x not in macList:macList.append(x) |
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
require("lsqlite3") | |
-- Igmar: Wanneer closen we dat DB object eigenlijk ? | |
db = sqlite3.open('/etc/asterisk/users.sqlite') | |
--CONSOLE = "Console/dsp" -- Console interface for demo | |
--CONSOLE = "DAHDI/1" | |
--CONSOLE = "Phone/phone0" | |
TRUNK = "DAHDI/G1" |
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 os | |
''' | |
.ssh/config (windows,for local git server): | |
Host host100 | |
Hostname 192.168.1.100 | |
User git | |
IdentityFile C:/Users/admin/.ssh/id_rsa_gitBackup_host100 | |
repo example: |
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
''' | |
fileName : build.py | |
usage : build.py py2exe | |
''' | |
from distutils.core import setup | |
import py2exe | |
import sys | |
includes = ["encodings", "encodings.*"] | |
sys.argv.append("py2exe") |
NewerOlder