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.
| test | 
12 lines
of
Ruby
by
test
 | 
401 Bytes | 
Show | 
Edit | 
Expand | 
  1
2
3
4
5
6  | 
  describe 'permit some elements from params and miss others' do
  before do
    @params = ActionController::Parameters.new @hash
  end
  it 'should log non-permitted attributes' do
    ActiveSu... | 
  
 
 | 
| sf | 
21 lines
of
Python
by
 vdfb
 | 
639 Bytes | 
Show | 
Edit | 
Expand | 
  1
2
3
4
5
6
7  | 
  kmer_size = 12
def split_dna(dna, kmer_size):
    kmers = []
    for start in range(0,len(dna)-(kmer_size-1),1):
        kmer = dna[start:start+kmer_size]
        kmers.append(kmer)
    retur... | 
  
 
 | 
| example daterangepicker | 
20 lines
of
HTML
by
paridin
 | 
1009 Bytes | 
Show | 
Edit | 
Expand | 
  1
2
3
4  | 
  
<link href="{% static 'css/daterangepicker.css' %}" rel="stylesheet" />
<div>
<form action="#" enctype="multipart/form-data" method=""><input calendar-foo="" name="csrfm... | 
  
 
 | 
| test ruby code | 
132 lines
of
Ruby
 | 
4.72 KB | 
Show | 
Edit | 
Expand | 
  1
2
3
4
5
6
7
8
9
10  | 
  require 'httparty'
require 'cgi'
require 'multi_json'
module Pocket
  class Connection
    include HTTParty
    base_uri 'https://getpocket.com'
    headers "Content-Type" => "applicatio... | 
  
 
 | 
| llll | 
2 lines
of
Plain text
 | 
55 Bytes | 
Show | 
Edit | 
Expand | 
  1
2  | 
  yum install epel-release -y
yum install lsof xl2tpd -y  | 
  
 
 | 
| Python fib | 
5 lines
of
Python
 | 
88 Bytes | 
Show | 
Edit | 
Expand | 
  1
2
3
4
5  | 
  def fib(num)
    if num >= 1:
        return num
    return fib(num-1) + fib(num-2) | 
  
 
 | 
| test | 
5 lines
of
diff
 | 
199 Bytes | 
Show | 
Edit | 
Expand | 
  1
2
3
4
5  | 
  --- /tmp/diffy20150722-27718-d2d28y  2015-07-22 22:42:11.556778963 +0000
+++ /tmp/diffy20150722-27718-lzujgd  2015-07-22 22:42:11.556778963 +0000
@@ -1 +0,0 @@
-first
  | 
  
 
 | 
| test | 
5 lines
of
diff
 | 
80 Bytes | 
Show | 
Edit | 
Expand | 
  1
2
3
4
5  | 
  -Hello how are you
+Hello how are you?
 I'm fine
-That's great
+That's swell  | 
  
 
 | 
| test | 
8 lines
of
diff
 | 
226 Bytes | 
Show | 
Edit | 
Expand | 
| 
 | 
| test | 
1 line
of
JavaScript
 | 
65 Bytes | 
Show | 
Edit | 
Expand | 
  1  | 
  onchange{ actualizaCampo("Variablevendedor", listaValor(this)); } | 
  
 
 |