Skip to content

Instantly share code, notes, and snippets.

View EdwinRozario's full-sized avatar
🏍️

Edwin Rozario EdwinRozario

🏍️
  • StoryPark
  • Wellington, New Zealand
  • 01:28 (UTC -12:00)
View GitHub Profile
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
Challenge
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.

Assumptions

English alphabets in order is the constant.

CONSTANT = 'abcdefghijklmnopqrstuvwxyz'

A random shuffle of the constant is the ciper.

Example cipher: zyxwvutsrqponmlkjihgfedcba

@EdwinRozario
EdwinRozario / methode_missing_ex.rb
Created February 23, 2012 05:36
Method Missing
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
EdwinRozario / colorize.rb
Created February 22, 2012 20:27
colorize
class String
#
# Colors Hash
#
COLORS = {
:black => 0,
:red => 1,
:green => 2,
:yellow => 3,
class StrArraySort
attr_accessor :list
def initialize(list)
@list = list
end
def get_the_least_word list
mark = list[0].to_s