Welcome! This page is using CodeRay 1.1.2.
We currently have
3040 rays
in the database.
You can add a
New Ray
or browse the posted rays by pages.
String interpolation |
1 line
of
Ruby
|
81 Bytes |
Show |
Edit |
Expand |
1 |
"I like to drink #{if milk? then "milk" else "Jack Daniels" end} in the morning." |
|
Python test |
13 lines
of
Python
by
Nejr
|
264 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8
9
10 |
import sys, os
from django.http import HttpResponse
def view(request):
if False:
return HttpResponse('False!')
try:
a = 1 / 0
except DivideByZeroExceptionOrSomething... |
|
html |
12 lines
of
HTML
|
705 Bytes |
Show |
Edit |
Expand |
1
2
3
4 |
<code class="HTML">
[16:18:06][cmux.c,984][2]<Agent_QueueRead>ReadLen:33 Tag:251e0092 HeadMsg:a1,00,1e,45
[16:18:06][cmux.c,364][3]<Agent_MessageRead>(33)
a1 00 1e 45 f5 30 00 00 00 00 47 87 00 ... |
|
Shell test |
1 line
of
Plain text
|
41 Bytes |
Show |
Edit |
Expand |
1 |
cat something.txt else.txt > combined.txt |
|
Simple Ruby code |
2 lines
of
Ruby
|
92 Bytes |
Show |
Edit |
Expand |
1
2 |
helpers = Rails.application.routes.named_routes.helpers
helpers.sort.each do |h| puts h end |
|
Test |
3 lines
of
Ruby
by
Robin
|
35 Bytes |
Show |
Edit |
Expand |
1
2
3 |
def lolcake
puts "AWESOME"
end |
|
epic |
10 lines
of
Ruby
by
DanielZ
|
216 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8 |
require 'blogr'
require 'rails'
module Blogr
class Engine < Rails::Engine
initializer "static assets" do |app|
app.middleware.use ::ActionDispatch::Static, "#{root}/public"
... |
|
foobar |
1 line
of
Ruby
|
28 Bytes |
Show |
Edit |
Expand |
1 |
myRassh = { :this => "foo" } |
|
php test |
8 lines
of
PHP
|
226 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6 |
static $has_one = array(
"Sidebar" => "WidgetArea",
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.Widgets", new WidgetAreaEditor("Sideb... |
|
111 |
14 lines
of
XML
|
439 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7 |
<repositories>
<repository>
<id>nexus</id>
<name>local private nexus</name>
<url>http://192.168.0.201:8081/nexus/content/groups/public</url>
</repository>
</repos... |
|