-
Notifications
You must be signed in to change notification settings - Fork 0
kgyang/script
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
restore/merge the checkouts in CO_SAVE_FILE to current view.
The CO_SAVE_FILE MUST be created by 'co-save'.
The results are saved in /tmp/$LOGNAME/co-restore/result.diff.
Usage: co-restore <CO_SAVE_FILE>
save all clearcase checkout files along with their version info in a tar file.
Usage: co-save [CO_SAVE_FILE]
if CO_SAVE_FILE is not specifed, 'co-VIEWNAME-DATETIME.tar' is named.
The CO_SAVE_FILE is used by 'co-restore' to restore the checkout files to another view.
synchronize checked out files in current clearcase view from FTP SERVER to local Linux machine
update source code from local PC to specified clearcase view in remote machine
Usage:
export HOST_PASSWORD=xxxxxx
updateremoteco.py HOST VIEW
Find who added/deleted CODE in FILE in BRANCH (main branch by default)
Usage: whoci.py <add|del> <CODE|LINERANGE> <FILE> [BRANCH]
CODE: code piece, LINERANGE: startline,endline
BRANCH example:
main - main branch
Example:
whoci.py add 'int v = 1;' a.cc
whoci.py add 22,25 a.cc
build cscope files for source files in specified directory
Usage: bcscope <dirname>
automatic bid for shanghai license (for fun)
./codestat <file1> <file2>
identical to "diff -u diff1 diff2 | diffstat
sync source code between two git repositories
Usage: codesync <to|from> <remote>
download cs143(compilers design) pdf documents listed in the page
run gdb to analyse corrupted stack
./gdb_stack <exefile> <coredump>
generate README.md
translate hex integer to string
Usage:
1) echo '31 be' | itoa
2) ./itoa 32 be
translate hex integer to string.
Usage:
1) echo '31 be' | ./itoa.py
2) ./itoa.py 32 be
remove unprintable in files
Usage: prune_binary <file...>
remove trailing white space in file
Usage: ./rm_trailing_space <file...>
remove C/C++ comments
Usage: rmcomments [<file...>]
sendmail utility
cpu usage monitor
print process cpu usage
Usage: ./process_cpu_usage <processname>
This script prints out cppcheck results of code changes.
The code changes could be uncommitted (by default) or commit specified.
It returns 1 if there're error or warning reports.
Usage: git-cppcheck [<commit|file>...]
Examples:
git-cppcheck -- check uncommitted code changes
git-cppcheck HEAD -- check code changes in latest commit
git-cppcheck 03c58d -- check code changes in commit
git-cppcheck *.cc -- check files
list all changed/new files in a commit
Usage: ./git_ls [commit]
find out the commit which made the given code change
Usage: gt_whoci <text> <file>
plot realtime PTP timestamp information by reading log or connecting MACHINE
Usage: logvisualizer.py [-l sync|dlyr|tod|offset|freqoffset] [-v] [-f logfile] [-t <hours>]
-l: specify type of log to be parsed and shown
-f: specify logfile to be played back
-v: verbose mode, in which script will print received log
This script is used to read log from fifo in remote machine
Usage: rlogger -n <IP> [-t <HOURS>]
-m: master mode, in which script will close fifo before exit
This script is used to read log from fifo on remote machine
Usage: rlogger_ssh [-t <HOURS>] -n <IP>
-t: specify run time (hours), 24 hours by default
This script is used to read log from remote machine without time limitation
Usage: rlogger_ssh_simple <IP>
automatic telnet by using KSH's two-way FIFO
Usage: atelnet <MACHINE>
Telnet client class.
Usage: atelnet.py [-v] <IP>
-v: enable verbose
Example 1):
>>> from atelnet import ATelnet
>>> with ATelnet('135.252.212.251') as tn:
>>> rc, res = tn.run('ls /')
>>> if rc:
>>> for ln in res: print(ln)
Example 2):
-> { echo 'ls /'; echo 'ls /tmp'; } | ./atelnet.py 1.2.3.4
Example 3):
-> ./atelnet.py 1.2.3.4
automatic telnet by making temp fifo
Usage: atelnet_fifo <NE>
CLI client class.
Usage: cli.py [-v] <MACHINE>
-v: enable verbose'
Example 1):
>>> from cli import Cli
>>> with Cli('1.2.3.4') as cli:
>>> rc, res = cli.run('help')
>>> if rc:
>>> for ln in res: print(ln)
Example 2):
-> { echo 'help'; } | ./cli.py 1.2.3.4
Example 3):
-> ./cli.py 1.2.3.4
Telnet client class for innet.
Usage: itelnet.py [-v] <IP> <INNETC> <INNETD> [<LOGIN> <PASSWORD>]
-v: enable verbose
Example 1):
>>> from itelnet import ITelnet
>>> lc = ITelnet('1.2.3.4', 1, 19)
>>> rc, res = lc.run('ls /')
>>> if rc:
>>> for ln in res: print(ln)
Example 2):
-> { echo 'ls /'; echo 'ls /tmp'; } | ./itelnet.py 1.2.3.4 1 19
Example 3):
-> ./itelnet.py 1.2.3.4 1 19
-> ./itelnet.py 1.2.3.4 1 2 username password
upload directory specified to ftp server
Usage: pdir <ldir> <rdir>
get/put files from/to peer server
Usage: rftp <get|put> <filename>...
get/put files from/to peer server via sftp
Usage: rsftp <get|put> <filename>...
build trust anchor
Usage: buildpem.py <csvfile> <pemfile>
- Input: <csvile>, Output: <pemfile>
verfiy trust anchor via SHA-256 calculation
Usage: verifypem <pemfile>
use iptables to block ip in secure/auth log and ips_deny.txt
Usage: ./blockip.sh <start|stop>
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published