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
ssh-copy-id user@remote_server | |
# or | |
cat ~/.ssh/id_rsa.pub | ssh username@host "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys" |
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
# print the line contains the expression | |
perl -ne 'print if /expression/' xxx.log | |
# print some capture datea | |
perl -ne 'print "$1\n" if /aaa=(\d+)\s.*/' xxx.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
import sys,os,subprocess | |
def get_file_mode_change (branch1, branch2): | |
cmd = 'git diff --summary ' + branch1 + '..' + branch2 + ' | grep "mode change" | ' + " awk '{ print $6 }' " | |
output = subprocess.check_output (cmd, shell=True) | |
return output.splitlines() | |
def get_file_deleted (branch1, branch2): | |
cmd = 'git diff --name-status ' + branch1 + '..' + branch2 + ' | grep "^D" | ' + " awk '{ print $2 }' " |
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/perl -w | |
use strict; | |
# | |
my $commit = ""; | |
my $cc = $ARGV[0]; | |
my $up_branch = "up_branch"; | |
chdir "./adaptation_resilience"; |
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
nslookup -query=aaaa domain-v6.xxx.com | |
or | |
host domain-v6.xxx.com |
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
ifconfig| grep 'inet ' | /usr/bin/grep -o -E '([0-9]{1,3}\.){3}[0-9]{1,3}' |