Welcome! This page is using CodeRay 1.1.2.

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

Page 188, 10 entries

Blah 8 lines of Ruby 166 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
 def new
      @post = Post.new
  
      respond_to do |format|
        format.html # new.html.erb
        format.json { render json: @post }
      end
    end
Everything is an object 15 lines of HAML by der_flo 131 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"hello".capitalize
#=> "Hello"

-123.abs
#=> 123

def cool 
  puts "Yo"
end

x = 2
x.even?
#=> true
3.even?
#=> false
test 2 lines of C++ 36 Bytes Show Edit Expand
1
2
var o = new object();
o.DoWork();
ыфва 3 lines of Plain text by ваып 33 Bytes Show Edit Expand
1
2
3
апывапыыва
фыафыва
фывафыва ыва
asdf 1 line of HTML by asdfasd 91 Bytes Show Edit Expand
1
CodeRay.scan("5.times do\n  puts 'Hello, world!'\nend", :ruby).div(:line_numbers => :table)
test 1 line of Plain text 17 Bytes Show Edit Expand
1
gem install rails
Example of EXTjs 439 lines of JavaScript by Markus 13 KB Show Edit Expand
1
2
3
4
5
6
7
8
9
10
/*

This file is part of Ext JS 4

Copyright (c) 2011 Sencha Inc

Contact:  http://www.sencha.com/contact

GNU General Public License Usage
This file may be used under the terms of the GNU...
Terminal 4 lines of Ruby by wallyqs 64 Bytes Show Edit Expand
1
2
3
4
puts "Hello!"
html = <<HTML-
<h1>This is some HTML.</h1>
HTML
test 1 line of Ruby 13 Bytes Show Edit Expand
1
puts "hi#{f}"
test 7 lines of PHP 121 Bytes Show Edit Expand
1
2
3
4
5
6
7
public function testAction($data = null) {
  if ($data) {
    //do something here
  } else {
    //bad stuff happens
  }
}

Page 188, 10 entries