Skip to content

Instantly share code, notes, and snippets.


Edwin Rozario EdwinRozario

View GitHub Profile
View regex_question
Axe activated rune INVISIBILITY
Rikki Maru activated rune DOUBLEDAMAGE
Axe and Rikki Maru are the name of DOTA2 character names
INVISIBILITY and DIUBLEDAMAGE are the names of runes
1. Select the name of the character from the log.
2. Select the name of the character from the log.

Atbash is a simple substitution cipher possible with any known alphabet. It emerged around 500-600 BCE. It works by substituting the letters of an alphabet with another.


English alphabets in order is the constant.

CONSTANT = 'abcdefghijklmnopqrstuvwxyz'

A random shuffle of the constant is the ciper.

Example cipher: zyxwvutsrqponmlkjihgfedcba

EdwinRozario / methode_missing_ex.rb
Created February 23, 2012 05:36
Method Missing
View methode_missing_ex.rb
class Foo
MYMETHODS = ['van', 'car', 'bus']
def foo(x)
case x
when 'van' then return 'Long vehicle'
when 'car' then return 'Small vehicle'
when 'bus' then return 'Very Long vehicle'
else return 'None'
EdwinRozario / colorize.rb
Created February 22, 2012 20:27
View colorize.rb
class String
# Colors Hash
:black => 0,
:red => 1,
:green => 2,
:yellow => 3,
View String Array Sort
class StrArraySort
attr_accessor :list
def initialize(list)
@list = list
def get_the_least_word list
mark = list[0].to_s