Skip to content

Instantly share code, notes, and snippets.

View sayes2x's full-sized avatar
🏠
Working from home

Scott Price sayes2x

🏠
Working from home
View GitHub Profile
@sayes2x
sayes2x / heartbeat.js
Last active August 13, 2018 14:47
A React component that will function as a "heartbeat", or timer, for an application.
import React, { Component, Fragment } from 'react';
import PropTypes from 'prop-types';
export default class Heartbeat extends Component {
constructor(props) {
super(props);
this.state = {
nextBeat: new Date().getTime() + this.props.heartbeatInterval,
timeout: null
};
@sayes2x
sayes2x / index.html
Last active October 21, 2017 15:29
Technical Documentation Page: JavaScript
<nav id=navbar>
<header id="nav-header">JS Documentation</header>
<div id="nav-div">
<a class="nav-link" href="#Introduction">Introduction</a>
<a class="nav-link" href="#What_you_should_already_know">What you should already know</a>
<a class="nav-link" href="#JavaScript_and_Java">JavaScript and Java</a>
<a class="nav-link" href="#Hello_world">Hello world</a>
<a class="nav-link" href="#Variables">Variables</a>
<a class="nav-link" href="#Declaring_variables">Declaring variables</a>
<a class="nav-link" href="#Variable_scope">Variable scope</a>
@sayes2x
sayes2x / index.html
Created October 21, 2017 15:29
Survey Form
<head>
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
</head>
<main>
<h1 id="title">Survey Form</h1>
<form id="survey-form" action="#">
<p id="description">Let us know how we can improve freeCodeCamp</p>
<div id="grid">
<label id="name-label" for="name">* Name</label>
<input id="name" type="text" placeholder="Enter your name" required>
@sayes2x
sayes2x / index.html
Created October 21, 2017 15:29
Samuel Morse Tribute Page
<head>
<script type="text/javascript" src="https://code.jquery.com/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<div class="jumbotron">
<h1 class="text-center">Samuel Morse</h1>
<h2 class="text-center">Inventer of telegraph and developer of Morse Code</h2>
@sayes2x
sayes2x / index.html
Created October 21, 2017 15:28
Random Quote Generator
<div class="main">
<div class="flex1">
<p><i class="fa fa-quote-left" aria-hidden="true"></i></p>
<p id="quote" class="quote"></i></p>
<i class="fa fa-quote-right" aria-hidden="true"></i>
</div>
<p id="author" class="author"></p>
<div class="flex2">
<i id="tweet" class="fa fa-twitter-square" aria-hidden="true"></i>
<button id="newQuoteButton" type="button">New quote</button>
@sayes2x
sayes2x / index.html
Created October 21, 2017 15:28
Show the Local Weather
<h1>Local Weather</h1>
<p id = "location"></p>
<p id = "temprature" onclick="changeUnits()"></p>
<p id = "weather"></p>
<p id = "icon"></p>
<p class="link">by <a href="https://codepen.io/sayes2x/" id="link" target="_blank">Scott Price</a></p>
<img src="" alt="">
@sayes2x
sayes2x / index.html
Created October 21, 2017 15:28
Wikipedia Viewer
<div id="position" class="center">
<p><a href="https://en.wikipedia.org/wiki/Special:Random" target="_blank">Click here for a random article</a></p>
<div id="search" class="searchClose">
<div id="close" class="hideClose"><i class="material-icons">power_settings_new</i></div>
<div id="handle" class="showHandle"></div>
<form onSubmit="return false;">
<input id="input" class="hideInput" type="text" autocomplete="off">
</form>
</div>
<p id="instruction" class="showInstruction">Click icon to search</p>
@sayes2x
sayes2x / index.html
Created October 21, 2017 15:28
Twitch TV Streamer
<header>
<div class="spacer"></div>
<div class="title">
<span>Twitch Streamers</span>
<form onSubmit="return false;">
<input class="filter" type="text" value="Filter by Stream Name">
</form>
</div>
<ul class="status">
<li class="allStreams wide"><span class="bullet allBullet">⬤</span><span class="visable">All</span></li>
@sayes2x
sayes2x / index.html
Created October 21, 2017 15:27
Personal Portfolio: Ascendancy Web Design Studio
<head>
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<!-- Navigation Bar -->
<nav id="navbar" class="navbar navbar-inverse navbar-fixed-top">
<!-- 6. My portfolio should have a navbar with an id of "navbar". 3. The navbar should always be at the top of the viewport.-->