Skip to content

Instantly share code, notes, and snippets.

View featherart's full-sized avatar
🎯
Focusing

Feather featherart

🎯
Focusing
View GitHub Profile
@featherart
featherart / gist:7000647
Created October 16, 2013 00:10
HW 10/15/2013
@featherart
featherart / gist:6912049
Created October 10, 2013 02:22
Review Haiku HW
Book Review Haiku
This is an app to store a list of your favorite books with reviews in the form of Haikus for each book.
Create a Sinatra app that reads from/writes to a .erb file
The .erb file should include a form to enter a new book
the form should have a text input field for title, author, and a block input field for the haiku
The .erb file should list your books and haiku reviews
The list of reviews should persist, so you will need a database! There is only one table required, Books. This table should have 3 fields: Title, Author, and Review
Bonus items!
@featherart
featherart / gist:6877514
Created October 8, 2013 00:30
css for javascript
body {
width: 100%;
background-image:url('../img/wavegrid.png');
}
#main_container {
margin: 10px auto;
width: 800px;
}
@featherart
featherart / gist:6877509
Created October 8, 2013 00:29
javascript for tic-tac-toe
// name_of_obj.name_of_key_in_object => value_associated_with_that_key
var board = [
[0, 0, 0],
[0, 0, 0],
[0, 0, 0]
];
// Variable to store the winning player.
var winningPlayer= 0;
@featherart
featherart / second_week.html
Last active January 9, 2019 16:55
Week 2 quiz in JavaScript
<html>
<head>
<title>!Quiz - Week 2</title>
</head>
<body>
<center>
<h1>Puppies - wait, is that a puppy?! </h1>
<img id="daPuppies" src="puppies.jpg" width="300" height="auto" />
<h3> don't forget to open your Chrome console </h3>
<button onclick="alert('function needed!');">Bigger Puppies</button>
@featherart
featherart / gist:6802810
Created October 3, 2013 00:43
ATM spec file
Specification:
Keep track of the checking and savings balances somewhere
Add functionality so that a user can deposit money into one of the bank accounts.
Make sure you are updating the display and manipulating the HTML of the page so a user can see the change.
Add functionality so that a user can withdraw money from one of the bank accounts.
Make sure you are updating the display and manipulating the HTML of the page so a user can see the change.
Make sure the balance in an account can't go negative. If a user tries to withdraw more money than exists in the account, ignore the transaction.
When the balance of the bank account is $0 the background of that bank account should be red. It should be gray when there is money in the account.
What happens when the user wants to withdraw more money from the checking account than is in the account? These accounts have overdraft protection, so if a withdrawal can be covered by the balances in both accounts, take the checking balance down to $0 and take the rest of the
@featherart
featherart / gist:6802627
Created October 3, 2013 00:20
ATM Homework CSS
@import url(http://fonts.googleapis.com/css?family=Oleo+Script);
@import url(http://fonts.googleapis.com/css?family=Ruluko);
#content {
margin: 0 auto;
text-align: center;
width: 700px;
}
#nav {
@featherart
featherart / gist:6802588
Created October 3, 2013 00:15
ATM homework HTML document
<!doctype html>
<html>
<head>
<title>ATM</title>
<meta charset="utf-8">
<link rel="stylesheet" href="atm.css">
<script src="atm.js"></script>
</head>
<body>
<div id="content">
@featherart
featherart / gist:6802564
Created October 3, 2013 00:13
ATM stub file
// https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers.onload
// The load event fires at the end of the document loading process.
// At this point, all of the objects in the document are in the DOM,
// and all the images and sub-frames have finished loading.
window.onload = function(){
// https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers.onclick
// The click event is raised when the user clicks on an element.
document.getElementById("checkingDeposit").onclick = function(event){
// Any code you put in here will be run when the checkingDeposit button is clicked
<html>
<head>
<title>Supersize Me Cookie</title>
</head>
<body>
<button href="#" onclick="myStopFunction();">stop the cookie!</button>
<br>
<img name="fred" id="freddie" src="cookie.jpg" width="100" height="auto">