Skip to content

Instantly share code, notes, and snippets.

View trotha01's full-sized avatar

Trevor Rothaus trotha01

View GitHub Profile
@trotha01
trotha01 / README
Created September 23, 2014 02:37
Use to automatically pull and test when doing a git checkout.
Add the shell script to .git/hooks/post-checkout
chmod +x .git/hooks/post-checkout
Try it out!
Give feedback on improvements :)
@trotha01
trotha01 / TicTacToe.py
Last active November 13, 2016 00:12
A fun python implementation of tic tac toe
"""
A fun answer to the question:
How would you determine if someone has won a game of tic-tac-toe on a board of any size?
Reference:
(https://www.glassdoor.com/Interview/How-would-you-determine-if-someone-has-won-a-game-of-tic-tac-toe-on-a-board-of-any-size-QTN_1104.htm)
This scales in a few ways
1. We can change the size of the board, we're not limited to 3x3
2. We can parallelize the computations
module Main exposing (..)
import Html exposing (Html)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Animation exposing (px)
import Animation.Messenger
-- MODEL
@trotha01
trotha01 / .gitignore
Last active April 25, 2017 00:55
Elm example of counter list, showing different ways of splitting it into a module
elm-stuff
index.html
@trotha01
trotha01 / main.elm
Created February 2, 2018 16:52
Elm 0.18 Initial Window Size
module Main exposing (main)
import Html exposing (Html, text)
import Window
import Task
main =
Html.program
{ init = init