Skip to content

Instantly share code, notes, and snippets.

View Alphabetus's full-sized avatar
🎯
Focusing

Diogo Gomes Alphabetus

🎯
Focusing
View GitHub Profile
@Alphabetus
Alphabetus / rockGame.rb
Created January 9, 2019 15:47
Rock, Paper, Scissors game
puts "Welcome to Rock, paper or scissors... I actually tried to do a blackjack but i got stuck on arrays... i believe ill get to that with a bit more of knowledge.\n\n"
puts "Alright... give me 'rock', 'paper' or 'scissors'."
puts "You can also choose to 'quit' the game.\n\n"
answer = gets.chomp
case answer.downcase
when "quit"
puts "Alright... game will quit. Bye.\n\n"
return
when "rock", "paper", "scissors"
// PHOTO PLANT ################################################################################################################
function photoPlant($pID){
// db
include "includes/dbConfig.php";
// init
$out = null;
// gen hash
$varA = microtime();
$varB = time();
$varC = $varA . $varB;
@Alphabetus
Alphabetus / pet.rb
Created January 4, 2019 15:49
commit for exercise 3.5
class Pet
#attr handler
attr_reader :color, :breed
attr_accessor :name
#init method
def initialize(color, breed)
@color = color
@breed = breed
@hungry = true
@Alphabetus
Alphabetus / cat.rb
Created January 4, 2019 15:11
commit for exercise 3.4
class Cat
#attr handler
attr_reader :color, :breed
attr_accessor :name
#init method
def initialize(color, breed)
@color = color
@breed = breed
@hungry = true
end
@Alphabetus
Alphabetus / fav_foods.rb
Created January 4, 2019 14:30
Commit for exercise 3.3
#methods
def favFoods(runs)
food_array = []
runs.times do
# get info > store > hash
# get food name
puts "Name a favourite food."
f_name = gets.chomp
# food_array[:food_name] << gets.chomp
@Alphabetus
Alphabetus / program-1.rb
Created January 4, 2019 12:58
Commit for exercise 3.2
# METHODS
def greeting #greeting to the user
puts "\n\n"
puts "Welcome to my first Ruby program."
puts "--" * 25
end
def userName #user identification
puts "Please enter your name:"
name = gets.chomp
@Alphabetus
Alphabetus / program.rb
Created January 4, 2019 12:22
basic input program in ruby
# METHODS
def greeting #greeting to the user
puts "\n\n"
puts "Welcome to my first Ruby program."
puts "--" * 25
end
def userName #user identification
puts "Please enter your name:"
name = gets.chomp
@Alphabetus
Alphabetus / index.html
Last active December 26, 2018 21:13
html1.2 >> notes made for ckaltenbach904
<!DOCTYPE html>
<html lang="en">
<head>
<!-- <link rel="stylesheet" href="../css/styles.css"> -->
<!-- NOTE:
All i needed was to disable this line. let me explain why.
you are calling ../css/styles.css
the term `..` referrs to the folder 1 level above in the tree.
your tree looks like this:
@Alphabetus
Alphabetus / index.html
Created December 21, 2018 19:35
style p isolated anywhere.
<!DOCTYPE html>
<html>
<head>
<!-- header content here -->
</head>
<body>
<section class="jumbotron">
<!-- jumbotron content -->
</section>
<section class="someOtherSection">
// BEFORE LOAD
// Facebook
window.fbAsyncInit = function() {
FB.init({
appId : '345613179594716',
autoLogAppEvents : true,
xfbml : true,
version : 'v3.0'
});
};