Giter VIP home page Giter VIP logo

host-range's Introduction

host-range

Simple util for generate host range.

Update list of known packages:

> cabal update

Update cabal for support sandbox:

> cabal --version               # must be > 1.18.0.0 
> cabal install cabal-install   # if less

Create sandbox:

> cabal sandbox init

Install dependencies in sandbox:

> cabal install --dependencies-only -j4

Build:

> cabal build

Now you have binary in dist/build/host-range/host-range, copy host-range to directory from $PATH

Usage as util:

> echo "aaa-[000-004, 03 - 06 ].ya.ru,  test.ya.ru" | host-range
> ["aaa-000.ya.ru","aaa-001.ya.ru","aaa-002.ya.ru","aaa-003.ya.ru","aaa-004.ya.ru","aaa-03.ya.ru","aaa-04.ya.ru","aaa-05.ya.ru","aaa-06.ya.ru","test.ya.ru"]

Usage as network server:

> host-range -s

open 4000 port

Work with memcached protocol

session example:

➜  ~  telnet localhost 4000
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET host-[001-003].ya.ru, simple.host.ru
VALUE host-[001-003].ya.ru, simple.host.ru 0 61
[host-001.ya.ru,host-002.ya.ru,host-003.ya.ru,simple.host.ru]
END
Connection closed by foreign host.

compiled binary for mac and ubuntu 12.04:

http://yadi.sk/d/h1gAU5JvLCkEk

host-range's People

Contributors

chemist avatar

Watchers

 avatar  avatar

host-range's Issues

формат

Формат предполагался другим:
ws[01-03]f -> ws01f ws02f ws03f

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.