1
2
3
4
brew = "rdadadroxmocpronogomocdmqzx"
alphabet = "abcdefghijklmnopqrstuvwxyz"
word = ""
...

Ruby Newb needs some cleanup

by redpidgin, December 23, 2008 16:16, 7 refactorings, tagged with short, ruby, decode

Some code I've written for ...

5ce36f73f075f18632c284f56cedd23d Talk
1
2
3
4
def space_out_camel_case(stringAsCamelCase):
    """Adds spaces to a camel case string.  Failure to space out string returns the original string.
    >>> space_out_camel_case('DMLSServicesOtherBSTextLLC')
...

Python CamelCase to Camel Case (Py...

by bigsassy.myopenid.com, December 18, 2008 19:06, 1 refactoring, tagged with short, snippet, camelcase, camel case, re, regular expression

Hi, I'm a python newbie. C...

Cc4c514481dbf2cf9f602188dee3c212 Talk
1
2
3
4
def factorial( n )
  if !(n.is_a? Integer)
    raise ArgumentError, "argument must be a positive integer"
...

Ruby A simple factorial program.

by lordzoner.myopenid.com, November 12, 2008 02:16, 7 refactorings, tagged with short, ruby, factorial

I'm quite new to Ruby, and ...

88f4aad84b5441c255cbe96a0fcc6319 Talk
1
2
3
4
      res = []
      path_without_calculation.gsub(/\{(.*?)\}/) {|match|
        res << match[1.. match.size-2]
...

Ruby Extract text between {} bra...

by stephan, October 22, 2008 11:54, 4 refactorings, tagged with short, regexp, gsub

Can this be written shorten?

349779c687ad1de3e116f3a5feaf3f92 Talk
1
2
3
4
use File::Spec;

sub purge_archive{
...

Perl Delete files from a directory

by kire, October 14, 2008 21:12, 1 refactoring, tagged with perl, short

I want to remove all files ...

37fa9baa82d848871535d6e2101221e5 Talk
1
2
3
4
	function create_link($string) {

		$input = media_title($string);
...

PHP Prepare links - friendly URLs

by Memf, September 04, 2008 05:57, 2 refactorings, tagged with php, short, friendly, friendly urls, url, URLs, prepare, code, memforis, function, memf, links, create link

Please help shorten the cod...

71367d98df2bf14cbf704e7741eb402d Talk
1
2
3
4
# Ruby Quiz 2 - Scalable LCD Monitor 
# Gerard (smeevil) de Brieder - Govannon - 2008-06-12

...

Ruby Looking for comments on sty...

by smeevil, June 16, 2008 14:37, 3 refactorings, tagged with short, codereview, critics

Hi all,

I am looking for...

912b664b56818fd36821d006577ff3aa Talk
1
2
3
4
#!/usr/bin/env ruby

files = ARGV.collect { |fname| File.new(fname, 'w') }
...

Ruby Randomly split input lines.

by Scott Robinson, November 15, 2007 08:56, No refactoring, tagged with short, functional, oneliner, one-liner

My first Ruby script. I'm c...

1945ab4cdb87eaf5a5c906fa884c29f1 Talk
1
2
3
4
<script type="text/javascript">

window.onload = function() {
...

JavaScript Shorten links

by DeathfireD, November 09, 2007 14:23, 4 refactorings, tagged with short, url, short url

is there a better, shorter,...

421453710d51d7daaea8069af0aa4126 Talk