Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
##ss-redir 的 iptables 配置(透明代理)
透明代理指对客户端透明,客户端不需要进行任何设置就使用了网管设置的代理规则
创建 /etc/ss-redir.json 本地监听 7777
运行ss-redir -v -c /etc/ss-redir.json
iptables -t nat -N SHADOWSOCKS
# 在 nat 表中创建新链
iptables -t nat -A SHADOWSOCKS -p tcp --dport 23596 -j RETURN
# 23596 是 ss 代理服务器的端口,即远程 shadowsocks 服务器提供服务的端口,如果你有多个 ip 可用,但端口一致,就设置这个
# This is the simplest definition, with the addition of a type | |
input { | |
udp { | |
port => 25826 # Must be specified. 25826 is the default for collectd | |
buffer_size => 1452 # Should be specified. 1452 is the default for recent versions of collectd | |
codec => collectd { } # This will invoke the default options for the codec | |
type => "collectd" | |
} | |
} |
define(function(require) { | |
var React = require('react'); | |
var paramRegex = /__(\d)+/; | |
var parser = new DOMParser(); | |
var errorDoc = parser.parseFromString('INVALID', 'text/xml'); | |
var errorNs = errorDoc.getElementsByTagName("parsererror")[0].namespaceURI; | |
// turns the array of string parts into a DOM | |
// throws if the result is an invalid XML document. |
随着Docker的发展,Docker的生态圈也越来越成熟,GitHub上出现了很多与Docker相关的开源项目。近日,CenturyLink在其博客上总结了基于Docker的10个开发工具,主要集中在PaaS平台、集群管理、持续集成和Docker的管理工具等四个方面。InfoQ中文站在其基础上进行了整理,具体如下。
Flynn
Flynn是一个使用Go语言编写的开源PaaS平台,Flynn使用模块化的设计,任何一个模块都可以独立的进行修改、升级和替换。Flynn的目标是简化分布式环境中应用的部署和维护,通过使用git push
命令,Flynn就可以将应用部署到Docker,从而省去了复杂的配置和操作。Flynn的架构大致分为两层,Layer 0是底层的资源层,提供分布式配置、任务调度、服务发现、主机隔离等基础功能;Layer 1基于Layer 0构建了一个用于集群中管理、部署、扩展服务的系统,主要包括管理API/客户端、Git接收器、数据存储、路由。Flynn目前仍在开发中,尚未发布稳定版,但已经获得了很多公司的资助,它被称为是下一代的开源PaaS平台。
Deis Deis也是一个支持共有云和私有云的开源PaaS系统,Deis基于Docker和CentOS构建了一个类Heroku的PaaS系统。Deis主要设计用来和不同的云提供商进行交互,目前支持 Rackspace、EC2、 DigitalOcean、Google Compute Engine、Bare-Metal。Deis使用out-of-the-box的方式支持Ruby、Python、Node.js、Java、Clojure、Scala、Play、PHP、Perl、Dart和Go语言,同样支持git push部署。Flynn和Deis都是两个基于Docker的云计算微PaaS技术,关于它们的区别,可以参考[这篇文章](http://www.centurylinklabs.com/flynn-vs-deis-the-tale-of-two-docker-micro-pa
#!/bin/bash | |
JQPATH=$(which jq) | |
if [ "x$JQPATH" == "x" ]; then | |
echo "Couldn't find jq executable." 1>&2 | |
exit 2 | |
fi | |
set -eu | |
shopt -s nullglob |
'use strict'; | |
/** | |
* Created by Alexander Litvinov | |
* Email: alexander@codeordie.ru | |
* May be freely distributed under the MIT license | |
*/ | |
let singleton = Symbol(); | |
let singletonEnforcer = Symbol(); |