Playgrounds
Snippets
Developers
Compiler
All
ActionScript
Ajax
AngularJS
Apache
AppleScript
ASP.NET
Bash
C
C#
C++
Coffee
CoffeeScript
ColdFusion
Command
CSS
Delphi
Django
ES6
GLSL
Grunt
Gulp
HAML
Haskell
HTML
iOS
Jade
Java
JavaScript
jQuery
JSX
Less
LUA
MDX
MySQL
Objective
Other
Pascal
Perl
PHP
Plain text
PowerShell
Processing
Progress
Prolog
Pseudocode
Python
Rails
RegExr
Ruby
SASS
Scala
Scheme
SCSS
SmallBASIC
Smarty
SQL
Stylus
SVG
Swift
TypeScript
VHDL
X++
XHTML
XML
Xojo
XSLT
New snippet
New playground
Sign up
Login
Upload
Playgrounds
Snippets
Developers
Sign up
Login
Codepad is a place for developers to share code snippets (PHP, Java, Bash, C, C++, Python and more). Create your HTML, CSS and JS Demos.
Sign up
Learn more
Sort
Popular
Most liked
Most recent
Time
Today
Last week
Last month
Last year
All time
Select Languages
ActionScript
Ajax
AngularJS
Apache
AppleScript
ASP.NET
Bash
C
C#
C++
ColdFusion
Command
CSS
Delphi
Django
Grunt
Gulp
HAML
HTML
iOS
Jade
Java
JavaScript
jQuery
Less
MySQL
Objective
Other
Pascal
Perl
PHP
PowerShell
Processing
Prolog
Pseudocode
Python
Rails
RegExr
Ruby
SASS
Scala
Scheme
Smarty
SQL
Swift
VHDL
XHTML
XML
Xojo
XSLT
SCSS
CoffeeScript
GLSL
Progress
Stylus
ES6
Coffee
TypeScript
X++
Haskell
SmallBASIC
JSX
SVG
Plain text
LUA
MDX
Apply
Reset
popular • Ruby
open file to write
Ruby
0
0
1316
Classic Hello world! program with a class
Ruby
0
12
1253
Google Cloud (Ruby)
Ruby
0
8
1867
Activity Logging
Ruby
0
9
1361
get '/v2/games/:uuid'
Ruby
0
3
1175
test
Ruby
0
4
1131
Selenium WebDriver for Ruby
Ruby
0
1
1597
Get browser's logs in Selenium
Ruby
0
1
1339
Close browser after exception
Ruby
0
9
1275
Add test to quarantine in RSpec
Ruby
0
9
1548
Benchmark for require vs. Kernel.send :require
Ruby
0
1
1116
Artisan Shuffler
Ruby
0
5
1120
teste
Ruby
0
1
1041
Extract integer from string
Ruby
0
1
1259
Ruby Quicksort function
Ruby
0
7
2133
typograf.rb
Ruby
0
2
1286
1_ruby_quicksort.rb
Ruby
0
4
1169
1_ruby_quicksort.rb
Ruby
0
1
1044
Selenium WebDriver Element by ID
Ruby
0
1
1197
lip.rb
Ruby
0
1
1163