Sha256: 3ec286928694caa35eef768b65668994348dfc888b4af3d0ad037e9a07c531a8

Contents?: true

Size: 759 Bytes

Versions: 42

Compression:

Stored size: 759 Bytes

Contents

# Server: ruby p2p.rb password server server-uri merge-servers
# Sample: ruby p2p.rb foobar server druby://localhost:1337 druby://foo.bar:1337
# Client: ruby p2p.rb password client server-uri download-pattern
# Sample: ruby p2p.rb foobar client druby://localhost:1337 *.rb
require'drb';F,D,C,P,M,U,*O=File,Class,Dir,*ARGV;def s(p)F.split(p[/[^|].*/])[-1
]end;def c(u);DRbObject.new((),u)end;def x(u)[P,u].hash;end;M=="client"&&c(U).f(
x(U)).each{|n|p,c=x(n),c(n);(c.f(p,O[0],0).map{|f|s f}-D["*"]).each{|f|F.open(f,
"w"){|o|o<<c.f(p,f,1)}}}||(DRb.start_service U,C.new{def f(c,a=[],t=2)c==x(U)&&(
t==0&&D[s(a)]||t==1&&F.read(s(a))||p(a))end;def y()(p(U)+p).each{|u|c(u).f(x(u),
p(U))rescue()};self;end;private;def p(x=[]);O.push(*x).uniq!;O;end}.new.y;sleep)

Version data entries

42 entries across 42 versions & 5 rubygems

Version Path
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/pygments.rb-0.6.3/vendor/pygments-main/tests/examplefiles/condensed_ruby.rb
pygments.rb-0.6.3 vendor/pygments-main/tests/examplefiles/condensed_ruby.rb
pygments.rb-0.6.2 vendor/pygments-main/tests/examplefiles/condensed_ruby.rb
pygments.rb-0.6.1 vendor/pygments-main/tests/examplefiles/condensed_ruby.rb
pygments.rb-0.6.0 vendor/pygments-main/tests/examplefiles/condensed_ruby.rb
mortar-pygments.rb-0.5.7 vendor/pygments-main/tests/examplefiles/condensed_ruby.rb
mortar-pygments.rb-0.5.6 vendor/pygments-main/tests/examplefiles/condensed_ruby.rb
mortar-pygments.rb-0.5.5 vendor/pygments-main/tests/examplefiles/condensed_ruby.rb
pygments.rb-jruby-0.5.4.2 vendor/pygments-main/tests/examplefiles/condensed_ruby.rb
pygments.rb-jruby-0.5.4.1 vendor/pygments-main/tests/examplefiles/condensed_ruby.rb
pygments.rb-jruby-0.5.4 vendor/pygments-main/tests/examplefiles/condensed_ruby.rb
gitlab-pygments.rb-0.5.4 vendor/pygments-main/tests/examplefiles/condensed_ruby.rb
pygments.rb-0.5.4 vendor/pygments-main/tests/examplefiles/condensed_ruby.rb
pygments.rb-0.5.2 vendor/pygments-main/tests/examplefiles/condensed_ruby.rb
pygments.rb-0.5.1 vendor/pygments-main/tests/examplefiles/condensed_ruby.rb
pygments.rb-0.5.0 vendor/pygments-main/tests/examplefiles/condensed_ruby.rb
gitlab-pygments.rb-0.3.2 vendor/pygments-main/tests/examplefiles/condensed_ruby.rb
pygments.rb-0.4.2 vendor/pygments-main/tests/examplefiles/condensed_ruby.rb
pygments.rb-0.4.1 vendor/pygments-main/tests/examplefiles/condensed_ruby.rb
pygments.rb-0.3.7 vendor/pygments-main/tests/examplefiles/condensed_ruby.rb