https://github.com/OrdinaryDude/elastic-core-maven/blob/master/UPD1.md
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/python | |
import socket | |
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
s.bind(('0.0.0.0', 6000)) | |
while True: | |
data, addr = s.recvfrom(1024) | |
s.sendto(str(addr[1]), addr) |
docker用来隔离应用还是很方便的,一来本身的操作较为简单,二来资源占用也比虚拟机要小得多,三来也较为安全,因为像数据库这样的应用不会再全局暴露端口,同时应用间的通信通过加密和端口转发,更加安全。
Gitlab是目前比较流行的开源类Github代码管理平台。Gitlab使用Rails开发,使用PostgreSQL或MySQL数据库,Redis做缓存。一般自己搭建私有代码仓库,Gitlab通常是首选。这里简单介绍一下dockerized Gitlab。
Gitlab的docker镜像早已有人做好了,并且维护相当不错。大家可以前往其GitHub仓库了解该镜像的情况。官方repo的readme中已经有详细的安装配置方案,这里我简单的梳理一下部署流程。
这里以Ubuntu 14.04发行版为例,在bash中输入一下命令安装最新的docker:
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/env python | |
import time | |
import threading | |
from scapy.all import * | |
import sys | |
import socket | |
maxhop = 25 |
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
// can be run in go 1.0.3 | |
// build : go build netfwd.go | |
package main | |
import ( | |
"net" | |
"fmt" | |
"io" | |
"os" | |
) |
#参考资料
###下载单个文件,默认将输出打印到标准输出中(STDOUT)中
curl http://www.centos.org
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
#!/bin/bash | |
#脚本文件名: tc2 | |
######################################################################################### | |
#用TC(Traffic Control)解决ADSL宽带速度技术 Ver. 1.0 by KindGeorge 2004.12.27 # | |
######################################################################################### | |
#此脚本经过实验通过,更多的信息请参阅http://lartc.org | |
#tc+iptables+HTB+SFQ | |
# | |
#一.什么是ADSL? ADSL(Asymmetric Digital Subscriber Loop,非对称数字用户环路) | |
#用最简单的话的讲,就是采用上行和下行不对等带宽的基于ATM的技术. |
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
#!/bin/bash | |
### Setup a wifi Access Point on Ubuntu 12.04 (or its derivatives). | |
### make sure that this script is executed from root | |
if [ $(whoami) != 'root' ] | |
then | |
echo " | |
This script should be executed as root or with sudo: | |
sudo $0 | |
" |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>本地图片在线预览</title> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
var result=document.getElementById("result"); | |
var file=document.getElementById("file"); |
NewerOlder