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 string | |
import datetime | |
today = string.join(string.split(str(datetime.date.today()),"-"),"") | |
yesterday = str(int(today) - 1) |
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 time | |
t =time | |
today = t.strftime("%Y%m%d",t.localtime()) | |
yesterday = int(today) - 1 |
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 os, sys | |
import zlib | |
import base64 | |
filename = sys.argv[1] | |
def crc(fileName): | |
fd = open(fileName,"rb") | |
content = fd.readlines() | |
fd.close() | |
prev = None |
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 os | |
import sys | |
######################################################################## | |
class cnfparse: | |
"""config file parse | |
Usage:cnfparse [path_to_cnf-file]""" | |
#---------------------------------------------------------------------- |
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 | |
#99表 | |
for x in range(1, 10): | |
for y in range(1, x + 1): | |
print "%s*%s=%-2s"%(y, x, x *y), | |
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 | |
#99表2 | |
for i in range(1,10): | |
for j in range(1,i+1): | |
print str(j)+"*"+str(i)+"="+str(i*j), | |
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
%define version 5.3.10 | |
%define so_version 5 | |
Name: php | |
Summary: PHP: Hypertext Preprocessor | |
Group: Development/Languages | |
Version: %{version} | |
Release: 2%{?dist}.centos | |
License: The PHP license (see "LICENSE" file included in distribution) | |
Source: http://www.php.net/get/php-%{version}.tar.gz |
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
%define contentdir /var/www | |
%define with_oci8 %{?_with_oci8:1}%{!?_with_oci8:0} | |
%define with_mssql %{?_with_mssql:1}%{!?_with_mssql:0} | |
%define with_mhash %{?_with_mhash:1}%{!?_with_mhash:0} | |
Summary: The PHP HTML-embedded scripting language. (PHP: Hypertext Preprocessor) | |
Name: php | |
Version: 4.3.9 | |
Release: 3.9 | |
License: The PHP License |
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 -e | |
#author:syshack | |
echo "Before all,u should download pcre,js,scons,boost,mongodb sourcecode" | |
echo -n "Pls enter ur *needed* package path:" | |
read prepath | |
cd ${prepath:=.} | |
echo -n "Where your bin want to install:" | |
read mongodir | |
echo "Install scons" | |
tar -xvf scons-* |
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
#where to log | |
logpath=mongod.log | |
rest=true | |
logappend=true | |
# fork and run in background | |
fork = true | |
#port = 27017 |
OlderNewer