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
FROM mysql:5.6.23 | |
COPY ./my.cnf /etc/mysql/my.cnf | |
COPY ./docker-entrypoint-initdb.d/* /docker-entrypoint-initdb.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
#!/usr/bin/python | |
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford ([email protected]) | |
# The author disclaims copyright to this source code. | |
import sys | |
import struct | |
import socket | |
import time | |
import select |
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
#Sed是一个基本的查找替换程序 | |
#(不指定列数,默认是包含a的第一列)将1.txt文件中包含a的第一列中的a替换为A,并将结果写入n.txt文件中。 | |
cat my.txt|sed s/a/A/ >n.txt | |
#指定第二列,将1.txt文件中包含a的第二列中的a替换为A,并将结果写入n.txt文件中。 | |
cat my.txt|sed s/a/A/2 >n.txt | |
#将1.txt文件中的所有a替换为A,并将结果写入n2.txt文件中。该语句也可以在shell脚本中使用 | |
cat './1.txt ' |sed s/a/A/g >n2.txt |
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
# 替换两个或多个空格为一个空格 | |
sed 's/[ ][ ]*/ /g' file_name | |
# 替换两个或多个空格为分隔符: | |
sed 's/[ ][ ]*/:/g' file_name | |
# 如果空格与tab共存时用下面的命令进行替换 | |
# 替换成空格 | |
sed 's/[[:space:]][[:space:]]*/ /g' filename | |
# 替换成分隔符: |
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
#EXTINF:0,湖南卫视 | |
udp://@239.255.0.1:8080 | |
#EXTINF:0,东方卫视 | |
udp://@239.255.0.2:8080 | |
#EXTINF:0,深圳卫视 | |
udp://@239.255.0.3:8080 | |
#EXTINF:0,江苏卫视 | |
udp://@239.255.0.4:8080 | |
#EXTINF:0,CCTV5+高清 | |
udp://@239.255.0.5:8080 |
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 | |
# Author: kangkang <[email protected]> 2011 | |
# Licence: GPLv3 | |
import sys | |
class Res(): | |
def __init__(self): | |
self.result = [] | |
def add(self, value, offset): |
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 | |
while [ " == " ] | |
do | |
ssh_d_process_num=`ps aux |grep -E 'ssh ' |grep localhost |grep -v grep | wc -l` | |
if [ "$ssh_d_process_num" == "0" ]; then | |
echo "Trying to reconnect..." | |
ssh -gNfR *:10000:localhost:22 [email protected] -p2222 & | |
fi | |