Skip to content

Instantly share code, notes, and snippets.

View khan-hasan's full-sized avatar

Hasan Khan khan-hasan

  • Delta Air Lines
  • Atlanta, GA
View GitHub Profile
@khan-hasan
khan-hasan / index.html
Created September 28, 2017 17:18
CF 2.5 | refactored html and css files
<!DOCTYPE html><!-- Instructs browser what version of HTML the page is written in. html indicates HTML5 -->
<html lang="en">
<!-- Specifies the language of the element's content -->
<head>
<!-- A container for metadata, data about the HTML document which is not displayed -->
<!-- Google Analytics -->
<!-- Global Site Tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-107063946-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
@khan-hasan
khan-hasan / index.html
Created September 30, 2017 16:41
CF 2.6 | added JS to hide contact form on submission and display a confirmation message
<!DOCTYPE html><!-- Instructs browser what version of HTML the page is written in. html indicates HTML5 -->
<html lang="en">
<!-- Specifies the language of the element's content -->
<head>
<!-- A container for metadata, data about the HTML document which is not displayed -->
<!-- Google Analytics -->
<!-- Global Site Tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-107063946-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
@khan-hasan
khan-hasan / index.html
Created September 30, 2017 19:57
CF 2.7 | added running character count beneath contact form's textarea, charcount changes colors when over the max allowed chars, textarea turns red when empty message is attempted to submitted
<!DOCTYPE html><!-- Instructs browser what version of HTML the page is written in. html indicates HTML5 -->
<html lang="en">
<!-- Specifies the language of the element's content -->
<head>
<!-- A container for metadata, data about the HTML document which is not displayed -->
<!-- Google Analytics -->
<!-- Global Site Tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-107063946-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
@khan-hasan
khan-hasan / index.html
Created October 2, 2017 15:01
CF 2.8 | dynamically add work samples (images) to work section, dynamically add alternating border colors to those images
<!DOCTYPE html><!-- Instructs browser what version of HTML the page is written in. html indicates HTML5 -->
<html lang="en">
<!-- Specifies the language of the element's content -->
<head>
<!-- A container for metadata, data about the HTML document which is not displayed -->
<!-- Google Analytics -->
<!-- Global Site Tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-107063946-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
@khan-hasan
khan-hasan / index.html
Created October 2, 2017 17:40
CF 2.9 | added js code to create objects out of the work-section images, added mouseenter/mouseleave code to display work description on hover
<!DOCTYPE html><!-- Instructs browser what version of HTML the page is written in. html indicates HTML5 -->
<html lang="en">
<!-- Specifies the language of the element's content -->
<head>
<!-- A container for metadata, data about the HTML document which is not displayed -->
<!-- Google Analytics -->
<!-- Global Site Tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-107063946-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
@khan-hasan
khan-hasan / index.html
Created October 3, 2017 02:13
CF 2.10 | implemented google maps api and added map to contact section
<!-- ******* in the faq section, if you stare at it for a while, it suddenly changes colors slightly. debug it. in fact, the entire page seems to shift slightly. i think all the carousel images have to be the same size (especially height)-->
<!DOCTYPE html><!-- Instructs browser what version of HTML the page is written in. html indicates HTML5 -->
<html lang="en">
<!-- Specifies the language of the element's content -->
<head>
<!-- A container for metadata, data about the HTML document which is not displayed -->
<!-- Google Analytics -->
<!-- Global Site Tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-107063946-1"></script>
<script>
@khan-hasan
khan-hasan / index.html (calculator)
Created October 7, 2017 14:47
CF 2.11 | final submission for achievement 2
<!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">
<title>Calculator</title>
<link rel='stylesheet' href='http://d33wubrfki0l68.cloudfront.net/css/ebe0759bf259b6caeadee6137973481046ac5636/css/normalize.css'/>
<link rel="stylesheet" href="css/styles.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
@khan-hasan
khan-hasan / program.rb
Created October 7, 2017 16:14
CF 3.1 | simple "hello world" program in ruby
def greeting
puts "Please enter your name:"
name = gets.chomp
puts "Hello " + "" + name
end
greeting
@khan-hasan
khan-hasan / program2.rb
Created October 7, 2017 16:44
CF 3.2 | 3 simple ruby "hello world" programs
if true
puts "this is true"
else
puts "this is false"
end
@khan-hasan
khan-hasan / fav_foods.rb
Created October 7, 2017 17:13
CF 3.3 | simple ruby program using loops, hashes, and arrays
def fav_foods
food_array = []
3.times do
puts "Name a favorite food."
food_array << gets.chomp
end
food_array.each do |food| # do something to each element in food array; that element is to be referred to as food
puts "I like #{food} too!" # the thing we're doing
end # ends the loop
p food_array