Skip to content

Instantly share code, notes, and snippets.

View jtomchak's full-sized avatar
🐋
Chippin' away at it

Jesse Tomchak jtomchak

🐋
Chippin' away at it
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="timeoutLoop">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
@jtomchak
jtomchak / function.elm
Created August 22, 2017 22:44
All functions in Elm are curried by default. If you have "a function of 2 arguments", it's really a function that takes one argument and returns a function that takes another argument.
fullName fName lName = fName ++ " " ++ lName
//<function> : String -> String -> String
fullName "Jesse"
//<function> : String -> String
lastName = fullName "Jesse"
//<function> : String -> String
lastName "Tomchak"
@jtomchak
jtomchak / Elm Append List
Created August 31, 2017 03:27
Elm Compiler when trying to append to a new list
The 1st argument to function `append` is causing a mismatch.
5| List.append "black" fishes
^^^^^^^
Function `append` is expecting the 1st argument to be:
List a
But it is:
@jtomchak
jtomchak / recordUpdate.sh
Last active August 31, 2017 03:40
Elm Record Update
> me = { name = "Jesse", age = 36, beard=True}
{ name = "Jesse", age = 36, beard = True }
: { age : number, beard : Bool, name : String }
> meShaved = { me | beard=False }
{ name = "Jesse", age = 36, beard = False }
: { age : number, name : String, beard : Bool }
> me
{ name = "Jesse", age = 36, beard = True }
: { age : number, name : String, beard : Bool }
> meShaved
@jtomchak
jtomchak / starman.hs
Created September 28, 2017 04:02
Starman, version of hangman, in Haskell on the command line
--starman super game
starman :: String -> Int -> IO ()
starman word n = turn word ['-' | x <- word] n
--checking the guessed letter against the word
check :: String -> String -> Char -> (Bool, String)
check word display c =
( c `elem` word
, [ if x == c
then c
@jtomchak
jtomchak / MeowClick.js
Created February 2, 2018 21:36
Current Meow Click
window.onload = function() {
console.log("OH SNAP, Kittens!!!!");
let searchButton = document.getElementById("searchButton");
let searchInput = document.getElementById("searchInput");
let meowImage = document.getElementById("randomGliphImage");
searchButton.addEventListener("click", fetchGiphy);
function fetchGiphy() {
//Go get the kitten stuff meow!!
@jtomchak
jtomchak / index.html
Created February 5, 2018 17:12
Teams
<body>
<div class="box">
<div class="box-content">
<h3 id="teams"></h3>
<ul id="sports-teams"></ul>
</div>
</div>
</body>
@jtomchak
jtomchak / index.html
Created February 6, 2018 22:03
Bootstrap columns for md sm lg
<!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>Kissy Movies</title>
</head>
@jtomchak
jtomchak / app.js
Created February 6, 2018 22:44
Start of movie poster town
import "jquery";
import "./style.scss";
$(document).ready(function() {
console.log("I am working with jQuery. Sweet!!!!");
let moviesList = [];
//Get Movies HTTP request!
const getMovies = () => {
const movieURL =
@jtomchak
jtomchak / movietown.js
Created February 7, 2018 21:22
Movie Town with Posters appended to DOM
import "jquery";
import "./style.scss";
$(document).ready(function() {
console.log("I am working with jQuery. Sweet!!!!");
let moviesList = [];
//Get Movies HTTP request!
const getMovies = () => {
const movieURL =