This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE <html> | |
<head> | |
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'> | |
<link rel="stylesheet" type="text/css" href="styles/styles.css"> | |
<title>PingPongPage</title> | |
</head> | |
<body> | |
<h1>Ping Pong Page</h1> | |
<div class = "container"> | |
<button class="btn" onclick="numberGame()">Play!</button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE <html> | |
<head> | |
<link rel="stylesheet" type="text/css" href="styles.css"> | |
<title>Layout Test</title> | |
</head> | |
<body> | |
<div class="wrapper"> | |
<div class="main-banner"><h1>Simple 2 column CSS layout, final layout<h1></div> | |
<div class="buttonrow"> | |
<ul class="buttonrow-ul"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE <html> | |
<head> | |
<!-- Fonts --> | |
<!-- Main Title --> | |
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'> | |
<!-- Buttons --> | |
<link href='http://fonts.googleapis.com/css?family=Droid+Sans' rel='stylesheet' type='text/css'> | |
<!-- Text --> | |
<link href='http://fonts.googleapis.com/css?family=Indie+Flower' rel='stylesheet' type='text/css'> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE <html> | |
<html lang="en"> | |
<head> | |
<!-- Meta Tags --> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> | |
<!-- Styles --> | |
<link rel="stylesheet" type="text/css" href="bootstrap.min.css"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ul { | |
margin: 0; | |
padding: 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function main { | |
`echo clear` | |
echo "Phonebooks on record:" | |
`echo find ~ -type f -name \*.dat` | |
echo "" | |
echo "Please select which phonebook" | |
echo "you would like to modify." | |
echo "Or you can create a newfile" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Find size of Rails app files in order | |
$ clear && ls -lr | awk '{ print $5 "--" $9 }' | sort -gr | |
Sample Output: | |
5563--Gemfile.lock | |
1814--Guardfile | |
821--Gemfile | |
408--config | |
306--testss | |
272--app | |
255--README.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Draws the first cards for the game | |
def first_draw | |
@player_hand = @deck.to_a.sample(2).to_h | |
@computer_hand = @deck.to_a.sample(2).to_h | |
puts "Your Hand: #{@player_hand.keys.first} #{@player_hand.keys.last}" | |
puts "Computer's Hand: #{@computer_hand.keys.first}" | |
check_ace |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts "Enter a number you want to calculate up to in the Fibonacci sequence" | |
max = gets.chomp | |
#Fibonacci | |
sequence = [] | |
0.upto(max.to_i) do |num| | |
if num > 2 | |
what_to_push = sequence[num - 1] + sequence[num - 2] | |
sequence << what_to_push | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Basic math functions added to Array class | |
class Array | |
def square | |
self.map { |n| n * n } | |
end | |
def cube | |
self.map { |n| n * n * n } | |
end | |
OlderNewer