Skip to content

Instantly share code, notes, and snippets.

View Ebeta's full-sized avatar

Eric Betancourt Ebeta

  • wyncode
  • Miami, FL
View GitHub Profile
#this question is from the first section and is the seco
puts "Let’s start with an easy one. Write the expression 1+1 in two different, but equivalent ways."
puts "Answer :"
puts "1.+(1)" #this answer is in standard ruby syntax
# Ruby Data Types: BigNum
puts "When a Fixnum grows too large, it becomes a Bignum. What's the largest Fixnum?"
puts "welcom to Arkham asylum Santa!!"
puts "what would you like to do"
puts "Options: explore, fight , leave , surprise"
choice = gets.chomp
case choice
when "explore"
puts " you found a new evadence of a plan to brake out "
puts " do you want to investigate the plan more "
puts "options: yes , no "
plan = gets.chomp
puts "welcome to Arkham asylum Santa!!"
puts "what would you like to do"
puts "Options: explore, fight , leave , surprise"
choice = gets.chomp
case choice
when "explore"
puts " you found a new evidence of a plan to brake out "
puts " do you want to investegate the plan more "
puts "options: yes , no "
plan = gets.chomp
puts <<END
_________(█)
_______██████
_____ ████████
____███████████_
__ (░░░░░░░)░░░)
__(░(░█░░█░)░░░)
__(░░(░░●░░░)░░░)
__ (░░░░◡░░)░░░░) # # ##### # # # # ## # #
_██(░░░░░░░░░░)██ # # # # # # # # # # ## ##
def max(a,b)
a < b ? b : a
end
puts max(44,23)
class Array
def togeather
self.inject{|sum,x| sum + x }
end
end
[[1, 2], [3, 4]].togeather
class Quadrilateral
attr_accessor :top, :bottom, :left, :right
def initialize(left, top, right, bottom)
@left = left
@right = right
@bottom = bottom
@top = top
class Game
def initialize
main_menu
end
end
class Human
attr_accessor :name
def initialize(name)
@Ebeta
Ebeta / gist:19d146c45acd31848eb7
Created February 8, 2015 22:17
WyncodeOrNot.html
<html>
<head>
<meta charset="UTF-8">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<title>title</title>
</head>
<body>
<form>
<span>
@Ebeta
Ebeta / gist:30b8ac9d4b741eb5eb75
Created February 8, 2015 22:19
wyncodeOrNot.js
$( "form" ).submit(function( event ) {
if ( $( "input:first" ).val() === "Wyncode" ) {
$( "span" ).text().show();
event.preventDefault();
}
$("input").css({'background-color' : 'red'});
event.preventDefault();
});