Skip to content

Instantly share code, notes, and snippets.

Avatar

Austin Jess ajess33

View GitHub Profile
View radioToggle.js
// React State
const [fileView, setFileView] = useState('SELECTED');
// this is our onChange handler
const toggleAll = e => {
setFileView(e.target.value);
};
// JSX
<header className="files-toggle">
View gist:dfe17dee3fdbbc2df27d52679b8e6bfb
"workbench.colorTheme": "Night Owl",
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.detectIndentation": false,
"editor.wordWrap": "on",
"editor.fontSize": 14,
"editor.lineHeight": 23,
"workbench.editor.tabSizing": "shrink",
"files.trimTrailingWhitespace": true,
"editor.fontWeight": "100",
@ajess33
ajess33 / wiki.js
Created Mar 21, 2018
Wikipedia Viewer json
View wiki.js
var searchbar = document.querySelector('#searchbar');
var searchButton = document.querySelector('#search');
var results = document.querySelector('.results');
var userInput = searchbar.value;
function fetchData() {
fetch(
'https://en.wikipedia.org/w/api.php?action=query&format=json&generator=search&gsrlimit=10&prop=extracts&pilimit=max&exintro&explaintext&exsentences=2&exlimit=max&gsrsearch=' +
userInput
@ajess33
ajess33 / index.html
Created Mar 19, 2018
html Local-Weather-Viewer
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Local Weather Viewer</title>
<link rel="stylesheet" href="assets/style.css">
</head>
@ajess33
ajess33 / weather.js
Created Mar 19, 2018
[object HTMLDivElement] firefox error
View weather.js
function getPosition() {
if (navigator.geolocation) {
// store location
navigator.geolocation.getCurrentPosition(fetchData);
console.log('Location Available');
} else {
// no location
console.log('No Location Available');
}
}
View caesar.c
#include <cs50.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
int main(int argc, string argv[]) {
if (argc != 2) {
printf("Error, try again");
View initials1.c
#include <cs50.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main(void)
{
// prompt user for name
printf("What is your name? ");
View initials.c
#include <cs50.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main(void)
{
// prompt user for name
printf("What is your name? ");