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/python | |
| # coding=utf-8 | |
| def main(): | |
| name = raw_input("What's you name?\n\t") | |
| print("\n\tHello " + name + ", Welcome to Python World!") | |
| if __name__ == "__main__": | |
| main() |
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/python | |
| # coding=utf-8 | |
| def main(): | |
| name = raw_input("What's your name?\n\t") | |
| print("\n\tHello " + name + ", Welcome to Python World!") | |
| if __name__ == "__main__": | |
| main() |
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
| ;;======================================== | |
| ;; 外观设置 | |
| ;;======================================== | |
| ;;禁用工具栏 | |
| (tool-bar-mode -1) | |
| ;;禁用菜单栏,F10 开启关闭菜单 | |
| (menu-bar-mode -1) |
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/python | |
| # coding=utf-8 | |
| import os, paramiko | |
| import time | |
| hosts = [ | |
| '172.16.16.198', | |
| '172.16.16.200' | |
| ] |
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/bash | |
| # Default use Sun HotSpot JDK. | |
| alternatives --install /usr/bin/java java /usr/java/default/bin/java 17000 \ | |
| --slave /usr/bin/appletviewer appletviewer /usr/java/default/bin/appletviewer \ | |
| --slave /usr/bin/apt apt /usr/java/default/bin/apt \ | |
| --slave /usr/bin/extcheck extcheck /usr/java/default/bin/extcheck \ | |
| --slave /usr/bin/HtmlConverter HtmlConverter /usr/java/default/bin/HtmlConverter \ | |
| --slave /usr/bin/idlj idlj /usr/java/default/bin/idlj \ | |
| --slave /usr/bin/jar jar /usr/java/default/bin/jar \ | |
| --slave /usr/bin/jarsigner jarsigner /usr/java/default/bin/jarsigner \ |
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/bash | |
| # | |
| # SCRIPT: rsync_app | |
| # AUTHOR: terry zheng | |
| # E-MAIL: jfhgmv@gmail.com | |
| # DATE: Mon Aug 13 10:33:38 2012 | |
| # REV: 1.0.A (Valid are A, B, D, T and P) | |
| # (for Alpha, Beta, Dev, Test and Production) | |
| # | |
| # PLATFORM: GNU/Linux (SPECIFY: AIX, FreeBSD, GNU/Linux, HP-UX, Solaris |
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
| #此类配置可以在命令行模式中输入show-options -g查询 | |
| set-option -g base-index 1 #窗口的初始序号;默认为0,这里设置为1 | |
| set-option -g display-time 5000 #提示信息的持续时间;设置足够的时间以避免看不清提示,单位为毫秒 | |
| set-option -g repeat-time 1000 #控制台激活后的持续时间;设置合适的时间以避免每次操作都要先激活控制台,单位为毫秒 | |
| set-option -g status-keys emacs #操作状态栏时的默认键盘布局;可以设置为vi或emacs | |
| set-option -g status-right "#(date +%H:%M_%m/%d_%a_)" #状态栏右方的内容;这里的设置将得到类似"17:23_09/19_Wed_"的显示 | |
| set-option -g status-right-length 18 #状态栏右方的内容长度;建议把更多的空间留给状态栏左方(用于列出当前窗口) | |
| set-option -g status-utf8 on #开启状态栏的UTF-8支持 | |
| #此类设置可以在命令行模式中输入show-window-options -g查询 |
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
| # 此类配置可以在命令行模式中输入:show-options -g查询 | |
| ## 开启可视化响铃,现在状态栏上。 | |
| set-option -g visual-bell on | |
| ## 窗口的初始序号;默认为0,这里设置为1 | |
| set-option -g base-index 1 | |
| ## 提示信息的持续时间;设置足够的时间以避免看不清提示,单位为毫秒 | |
| set-option -g display-time 5000 | |
| ## 控制台激活后的持续时间;设置合适的时间以避免每次操作都要先激活控制台,单位为毫秒 | |
| set-option -g repeat-time 1000 | |
| ## 操作状态栏时的默认键盘布局;可以设置为vi或emacs |
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/awk -f | |
| ## 过滤MegaCli 输出的PD/VD信息,单行模式 | |
| # awk 'BEGIN { FS=": "; ME_PD=0 } /^Media Error/ { if ( $2 != 0 ) ++ME_PD } END { print "Media_Error_PD = ",ME_PD }' | |
| BEGIN { | |
| FS=": "; OFF_LIN=0; MedErr_PD=0; OthErr_PD=0; PreFail_PD=0; NonOpt_VD=0 | |
| } | |
| /^Firmware state:/ { if ( $2 != "Online" ) ++OFF_LIN } |
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/awk -f | |
| ## MegaCli -LDPDInfo -aAll | |
| ## 过滤MegaCli 输出的PD/VD信息,单行模式 | |
| # awk 'BEGIN { FS=": "; ME_PD=0 } /^Media Error/ { if ( $2 != 0 ) ++ME_PD } END { print "Media_Error_PD = ",ME_PD }' | |
| BEGIN { | |
| FS=": "; OFF_LIN=0; MedErr_PD=0; OthErr_PD=0; PreFail_PD=0; NonOpt_VD=0 | |
| } |