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
#!/bin/sh | |
su ejabberd -c "ejabberdctl ejabberd@`hostname -s` register $1 serverIP password" |
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
CSS Sprite Google Toolbar | |
Image: | |
1.Download: | |
http://f.hatena.ne.jp/images/fotolife/y/yanxu/20080807/20080807011759.png | |
2.rename to: | |
toolbar_animation_20070919.png |
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 | |
import os | |
from glob import glob | |
for fname in glob('*.flv'): | |
print fname | |
mp4fname=fname.replace(".flv","") | |
cmd='~/Desktop/ffmpeg -i %s -ar 22050 %s.mp4'%(fname,mp4fname) | |
os.system(cmd) |
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
#import <Foundation/NSObject.h> | |
@interface Fraction: NSObject { | |
int numerator; | |
int denominator; | |
} | |
-(void) print; | |
-(void) setNumerator: (int) d; | |
-(void) setDenominator: (int) d; |
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
#!/bin/sh | |
# 1.check filesystem | |
# 2.check mysql slave | |
echo "70 Filesystem:" | |
ssh 70 "df -htufs" | |
echo | |
for db in ip1 ip2 ip3 ip4 |
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
>>> engine_res | |
[1, 2, 3, 4, 6, 5, 7] | |
>>> db_res | |
[(4, 'no1'), (1, 'no1'), (7, 'no1'), (2, 'no1'), (5, 'no1'), (3, 'no1'), (6, 'no1')] | |
>>> sorted(db_res,key=lambda k:engine_res.index(k[0])) | |
[(1, 'no1'), (2, 'no1'), (3, 'no1'), (4, 'no1'), (6, 'no1'), (5, 'no1'), (7, 'no1')] | |
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 | |
# encoding: utf-8 | |
""" | |
syncwiki.py | |
Created by QingFeng on 2008-09-05. | |
Copyright (c) 2008 woodpecker. All rights reserved. | |
""" | |
from twill.commands import * |
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 | |
# encoding: utf-8 | |
""" | |
Created by yanxu on 2008-10-16. | |
Copyright (c) 2008 Sina.com. All rights reserved. | |
""" | |
from __future__ import with_statement | |
import string,re | |
import MySQLdb |
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
portupgrade -m "WITH_XCHARSET=gb2312,gbk WITH_CHARSET=utf8" databases/mysql51-server/ | |
portupgrade -m "WITH_XCHARSET=gb2312,gbk" databases/mysql51-client |
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
LoadModule python_module libexec/apache22/mod_python.so | |
<Directory "/usr/local/SysMonitor/NMSWeb/"> | |
AllowOverride AuthConfig | |
Order allow,deny | |
Satisfy All | |
</Directory> | |
<Location "/"> | |
<IfModule mod_expires.c> |