Welcome! This page is using CodeRay 1.1.2.
We currently have
3019 rays
in the database.
You can add a
New Ray
or browse the posted rays by pages.
gtkdebug |
98 lines
of
Ruby
|
2.9 KB |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8
9
10 |
begin
require 'gtksourceview'
rescue LoadError
else
module Kernel
alias __raise raise
def raise(*args)
__raise(*args)
rescue Exception => exc
exc.backtrace.shif... |
|
fuck |
6 lines
of
Ruby
|
122 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6 |
class Fuck << self
def fuck(off, &block)
@fuck = { :fuck => %r{fuck}, :fuck2 => (0...23) }
@fuck.
end
end |
|
Test |
102 lines
of
Ruby
|
3.5 KB |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8
9 |
class Chars
attr_reader :string
alias_method :to_s, :string
include Comparable
... |
|
Array to String with commas and "and" before the last elemen |
3 lines
of
Ruby
by
Hallison Batista
|
170 Bytes |
Show |
Edit |
Expand |
1
2
3 |
array = ["one","two","three","four","five"]
join = array[0..-2].join(', ') + " and " + array[-1].to_s + " are numbers that belongs to the array of integers."
puts join |
|
test-- erase me |
0 lines
of
Ruby
|
0 Bytes |
Show |
Edit |
Expand |
|
Ruby |
3 lines
of
Ruby
by
pillar
|
22 Bytes |
Show |
Edit |
Expand |
1
2
3 |
def pts
puts "a"
end |
|
Function in test |
12 lines
of
Delphi
by
Daniel A. Bastos
|
223 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8
9
10 |
function Checkhighlighting(str : string) : boolean;
var
ct : integer;
begin
for ct := 0 to Length(str) to
if str[ct] = 'a' then
begin
... |
|
index method |
7 lines
of
Ruby
by
LOO
|
165 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7 |
def index
@posts = Post.published
respond_to do |format|
format.html
format.xml { render :xml => @posts }
end
end |
|
shell1 |
16 lines
of
Ruby
by
bartocc
|
464 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7 |
function scm_info {
(local GIT=$(__git_ps1) && [[ -n $GIT ]] && echo "$GIT") || (local SVN=$(svn_rev) && [[ -n $SVN ]] && echo "$SVN")
}
function setPrompt {
RED=$(tput setaf 1)
GREEN... |
|
Test |
8 lines
of
Ruby
by
test
|
262 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6 |
def population
@cities = City.find(:all)
@population_data_link = formatted_population_reports_url(:xml)
respond_to do |format|
format.html
format.xml { render :actio... |
|