Skip to content

Instantly share code, notes, and snippets.

View tengiao's full-sized avatar

Ernest Ngiao tengiao

  • Capital & Coast District Health Board
  • Wellington, New Zealand
View GitHub Profile
@tengiao
tengiao / index.html
Created October 3, 2018 10:19
CareerFoundry2_12_InteractiveWebsiteRevision
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Ernest's Portfolio</title>
@tengiao
tengiao / pet.rb
Created June 21, 2018 21:39
CareerFoundry3_5_ObjectOrientedProgII
class Pet
attr_reader :color, :breed, :name
attr_accessor :name
def initialize(color, breed)
@color = color
@breed = breed
@hungry = true
end
@tengiao
tengiao / cat.rb
Created June 21, 2018 03:05
CareerFoundry3_4_ObjectOrientedProgI
class Cat
attr_reader :color, :breed, :name
attr_accessor :name
def initialize(color, breed)
@color = color
@breed = breed
@hungry = true
end
@tengiao
tengiao / fav_foods.rb
Created June 20, 2018 23:31
CareerFoundry3_3_DataStructures
def fav_foods
food_array = []
3.times do
puts "Name a favourite food."
food_array << gets.chomp
end
p food_array
puts "Your favourite foods are #{food_array.join(", ")}."
@tengiao
tengiao / program2.rb
Created June 19, 2018 22:37
CareerFoundry3_2_ControlFlowInRuby
if (5+5==10)
puts "this is true"
else
puts "this is false"
end
@tengiao
tengiao / program.rb
Created June 19, 2018 00:27
CareerFoundry3_1_MeetRuby
def greeting
puts "Please enter your name:"
name = gets.chomp
puts "Hello" + " " + name
end
greeting
@tengiao
tengiao / index.html
Created June 18, 2018 04:12
CareerFoundry2_11_JavaScript&APIs
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Ernest's Portfolio</title>
@tengiao
tengiao / index.html
Created June 16, 2018 23:16
CareerFoundry2_10_ObjectLiterals
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Ernest's Portfolio</title>
@tengiao
tengiao / index.html
Created June 11, 2018 23:45
CareerFoundry2_9_Arrays&More
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Ernest's Portfolio</title>
@tengiao
tengiao / index.html
Last active June 11, 2018 22:36
CareerFoundry2_8_ConditionalStatements
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Ernest's Portfolio</title>