Welcome! This page is using CodeRay 1.1.2.

We currently have 3066 rays in the database.
You can add a New Ray or browse the posted rays by pages.

Page 93, 10 entries

maillogs 20 lines of Plain text 2.68 KB Show Edit Expand
1
2
Oct  7 15:38:26 alexandria postfix/smtpd[8914]: connect from ursa.uberspace.de[95.143.172.203]
Oct  7 15:38:26 alexandria postfix/smtpd[8914]: NOQUEUE: reject: RCPT from ursa.uberspace.de[95.143.1...
Prova 10 lines of Ruby by Marco 138 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
# Commento
class Prova
  def say something=nil
    something || "something"
  end
end
a = Prova.new
a.say

a.say "something else"
Ruby 11 lines of Ruby 143 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
do |arg1, arg2|
  if arg1 > arg2
    puts "Ok!"
  end
end

block = Proc.new do |arg1, arg2|
  if arg1 > arg2
    puts arg3
  end
end 
Ruby test 12 lines of Ruby 285 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
# ./Gemfile

source 'https://rubygems.org'
gem 'nokogiri'
gem 'rack', '~>1.1'
group :test, :development do
  gem 'rspec'
end
gem 'some_local_gem', :path => '/local/gem/path' if 1 < 2
gem '...
Ruby test 12 lines of Ruby 276 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
# ./Gemfile

source 'https://rubygems.org'
gem 'nokogiri'
gem 'rack', '~>1.1'
group :test, :development do
  gem 'rspec'
end
gem 'some_local_gem', :path => '/local/gem/path'
gem 'gem_hoste...
Ruby test 8 lines of Ruby 139 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
# ./Gemfile

source 'https://rubygems.org'
gem 'nokogiri'
gem 'rack', '~>1.1'
gem 'rspec', :require => 'spec'

# $> bundle install
Ruby test 11 lines of Ruby 284 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
# ./Rakefile
task :turn_off_alarm do
puts "Turned off alarm"
end
task :make_coffee do
cups = ENV["COFFEE_CUPS"] || 2
puts "Made #{cups} cups of coffee."
end
task :ready_for_the_day => [:tur...
Ruby test 13 lines of Ruby 318 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
# ./Rakefile
  task :turn_off_alarm do
    puts "Turned off alarm"
  end
 
  task :make_coffee do
    cups = ENV["COFFEE_CUPS"] || 2
    puts "Made #{cups} cups of coffee."
  end
 
  task...
Ruby test 42 lines of Ruby 577 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
12
h = Hash[:key1, 'value1', :key2, 'value2']
h = {key1 : ‘value1’, key2 : ‘value2’}

a = Array.new(); a << 1; a << 2;
a = [0,2,3]

class SomeClass
   # ...
end

SomeClass = Class.new do
  ...
Ruby test 42 lines of Ruby 491 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
h = Hash.new
h = {}

a = Array.new
a = []

class SomeClass
   # ...
end

SomeClass = Class.new do
   # ...
end

class MyHash < Hash
   # ...
end

MyHash = Class.new(MyHash) do
  ...

Page 93, 10 entries