Skip to content

Instantly share code, notes, and snippets.

@vladalive
Last active May 16, 2019 17:00

Revisions

  1. vladalive revised this gist May 16, 2019. 2 changed files with 1 addition and 1 deletion.
    1 change: 0 additions & 1 deletion shuffle_reader.rb
    Original file line number Diff line number Diff line change
    @@ -1 +0,0 @@
    text.gsub(/\w+/){ |w| a = w.split(/^(.)(.*)(.)$/); a[2] = a[2].split(//).shuffle; a.join}
    1 change: 1 addition & 0 deletions typoglycemia.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    text.gsub(/\w+/){ |w| a = w.split(/^(.)(.*)(.+)$/); a[2] = a[2] && a[2].split(//).shuffle; a.join}
  2. vladalive revised this gist Jun 20, 2011. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions shuffle_reader.rb
    Original file line number Diff line number Diff line change
    @@ -1,2 +1 @@
    text.gsub(/\w+/){ |w| a = w.split(/^(.)(.*)(.)$/); a[2] = a[2].split(//).shuffle; a.join}

    text.gsub(/\w+/){ |w| a = w.split(/^(.)(.*)(.)$/); a[2] = a[2].split(//).shuffle; a.join}
  3. vladalive created this gist Jun 20, 2011.
    2 changes: 2 additions & 0 deletions shuffle_reader.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    text.gsub(/\w+/){ |w| a = w.split(/^(.)(.*)(.)$/); a[2] = a[2].split(//).shuffle; a.join}