Linux netcat examples Jan 01, 0001

端口扫描

nc -z -v -n 172.31.100.7 21-25

Chat Server

Server: nc -l 1567

Client: nc 172.31.100.7 1567

文件传输

Server to Client:

Server: nc -l 1567 < file.txt

Client: nc -n 172.31.100.7 1567 > file.txt

Client to Server:

Server: nc -l 1567 > file.txt

Client: nc 172.31.100.23 1567 < file.txt

目录传输

Server: tar -cvf - dir_name | nc -l 1567

Client: nc -n 172.31.100.7 1567 | tar -xvf -

视频播放

Server: cat video.avi | nc -l 1567

...
Microservice Infrastructure Jan 01, 0001

Microservices Infrastructure

Modern platform for rapidly deploying globally distributed services provided by cisco.

https://github.com/CiscoCloud/microservices-infrastructure

Features

  • the ability to deploy applications utilizing resources across multiple datacenters (and even clouds),
  • deploying in a decentralized control model,
  • supporting intelligent endpoints,
  • heavy automation, and
  • the on-demand nature of deploying these services to support business requirements and scale.

Architectural Overview

  • Mesos cluster manager for efficient resource isolation and sharing across distributed services
  • Marathon for cluster management of long running containerized services
  • Consul for service discovery (By using Consul’s inbuilt DNS server)
  • Docker container runtime supported by Marathon
  • Multi-datacenter support
  • High availablity

Single Data Center Architecture

The base platform contains control nodes that manage the cluster and any number of compute nodes. Containers automatically register themselves into DNS so that other services can locate them.

...
Mininet links Jan 01, 0001

Introduction to Mininet: http://mininet.org/walkthrough/

OpenFlow Tutorial: https://github.com/mininet/openflow-tutorial/wiki

Mininet walkthrough: http://mininet.org/walkthrough/

RYU SDN Framework: http://osrg.github.io/ryu-book/en/html/

A good ryu blog: http://linton.tw/

Open vSwitch over DPDK on Ubuntu Jan 01, 0001

There are two approaches for using DPDK acceleration in DPDK. One is the openvswitch fork from intel, called dpdk-ovs the other is done directly in openvswitch with a different approach from intel.

VirtualBox preparations

To run openvswitch with DPDK I used a virtual machine (VirtualBox) because the NIC I had on my laptop was not supported. I created three virtual NICs for my vm, one behind NAT to use it to ssh into the vm from the host, and two in host-only mode, to be use for testing.

...
OpenStack Magnum社区及项目介绍 Jan 01, 0001

Add network management for native docker https://blueprints.launchpad.net/magnum/+spec/native-docker-network

https://etherpad.openstack.org/p/magnum-native-docker-network

From http://dockone.io/article/445

OVS 2.0 call flow Jan 01, 0001

Refer http://blog.csdn.net/night_elf_1020/article/details/37600791

Perform Consistent Snapshots with qemu guest agent Jan 01, 0001

A while back, I wrote an article about taking consistent snapshots of your virtual machines in your OpenStack environment. However this method was really intrusive since it required to be inside the virtual machine and to manually summon a filesystem freeze. In this article, I will use a different approach to achieve the same goal without the need to be inside the virtual machine.

The only requirement is to have a virtual machine running the qemu-guest-agent.

...
Pluribus Networks Jan 01, 0001

已经融资9500万美元的Pluribus公司,做得Server Switch产品,其CEO说,既能克服Vmware产品的scalability, invisibility, performance问题,又能克服Cisco ACI的系统封闭性。说白了就是把网络做在服务器里面,但是网络处理发生在交换芯片而不是CPU里面,跟Facebook Wedge一样 @盛科张卫峰

...
Programming Resources Jan 01, 0001

索引

ANDROID

ANGULAR

BOOTSTRAP

C#

C/C++

CASSANDRA

CHROME

CLOJURE

COUCHDB

D

DAPPER

DEVOPS

DOCKER

ERLANG

FIREFOX

GIT

GO

HADOOP

HASKELL

HTML5

IOS

JAVA

JAVASCRIPT

LINUX

LISP

LUA

MARKDOWN

MATH

MEMCACHED

MONGODB

MYSQL

NGINX

NODE.JS

OPENGL

OPENSTACK

PERL

PHP

POSTGRESQL

PUPPET

PYTHON

R

[RASPBERRY PI](#RASPBERRY PI)

REDIS

REGEX

RUBY

RUST

SCALA

SHELL

SPARK

STORM

SWIFT

VARNISH

VIM

WEB前端

WEB安全

WOLFRAM

开源系统

技术科普

数据挖掘/机器学习

数据结构/算法

程序设计

编程之外

编程工具

编程资源

网站架构

ANDROID

面向忙碌开发者的 Android 视频教程(Tuts+)

...
Python __file__ not defined problem Jan 01, 0001

__file__仅在文件中运行的时候才正常,而在交互式命令行中则需要使用变通的方法:

import os
import inspect
import sys
if not hasattr(sys.modules[__name__], '__file__'):
    __file__ = inspect.getfile(inspect.currentframe())

print os.path.dirname(os.path.abspath(__file__))