Skip to content

Instantly share code, notes, and snippets.

View sean-clayton's full-sized avatar
🎷
🐢

Sean Clayton sean-clayton

🎷
🐢
View GitHub Profile
@sean-clayton
sean-clayton / items.json
Created January 27, 2019 05:20
PoE Items
[
"https://web.poecdn.com/image/Art/2DItems/Amulets/AgateAmulet.png",
"https://web.poecdn.com/image/Art/2DItems/Amulets/Amulet1.png",
"https://web.poecdn.com/image/Art/2DItems/Amulets/Amulet2.png",
"https://web.poecdn.com/image/Art/2DItems/Amulets/Amulet3.png",
"https://web.poecdn.com/image/Art/2DItems/Amulets/Amulet4.png",
"https://web.poecdn.com/image/Art/2DItems/Amulets/Amulet5.png",
"https://web.poecdn.com/image/Art/2DItems/Amulets/Amulet6.png",
"https://web.poecdn.com/image/Art/2DItems/Amulets/Amulet7.png",
"https://web.poecdn.com/image/Art/2DItems/Amulets/BluePearlAmulet.png",
@sean-clayton
sean-clayton / coolean.ml
Created January 24, 2019 20:32
OCaml vs TypeScript Type System
type coolean =
| Cool
let string_of_coolean = fun (_: coolean) -> "Cool";;
string_of_coolean 1;
(* ^--- Error: This expression has type int
but an expression was expected of type coolean *)
def fizz_buzz(0, 0, _), do: "FizzBuzz"
def fizz_buzz(0, _, _), do: "Fizz"
def fizz_buzz(_, 0, _), do: "Buzz"
def fizz_buzz(_, _, n), do: n |> to_string
for num <- 1..100 do
fizz_buzz(rem(num, 3), rem(num, 5), num)
|> IO.puts
end
let fizzBuzz = (attempt) => {
switch (attempt) {
| (0, 0, _) => "FizzBuzz"
| (0, _, _) => "Fizz"
| (_, 0, _) => "Buzz"
| (_, _, n) => n |> string_of_int
}
};
for (num in 1 to 100) {
/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/

Keybase proof

I hereby claim:

  • I am sean-clayton on github.
  • I am seanclayton (https://keybase.io/seanclayton) on keybase.
  • I have a public key ASCIf75sX-mQeXfgKVn4WV3fZHsIMMsYmjhpPQ9HksZkMgo

To claim this, I am signing this object:

import React from "react";
import styled from "react-emotion/macro";
import ProductCard from "../product-card/ProductCard";
const ProductsContainer = styled.div`
display: grid;
grid-area: products;
grid-template-columns: repeat(${p => p.numColumns}, minmax(230px, 1fr));
grid-auto-rows: 1fr;
grid-gap: 2rem;
user
-
id: Int
role
-
id: Int
role_membership
-
@sean-clayton
sean-clayton / cheatsheet.ts
Created August 14, 2018 16:01
TypeScript Cheat Sheet
// _____ __ _ _
///__ \_ _ _ __ ___/ _\ ___ _ __(_)_ __ | |_
// / /\/ | | | '_ \ / _ \ \ / __| '__| | '_ \| __|
// / / | |_| | |_) | __/\ \ (__| | | | |_) | |_
// \/ \__, | .__/ \___\__/\___|_| |_| .__/ \__|
// |___/|_| |_|
//Typescript Cheat Sheet: every syntax feature exemplified
//variables are the same as javascript, but can be defined with a type:
var myString:string;
var myNumber:number;
"use strict";
var precacheConfig = [
["/index.html", "a276f98419fd8059eaabb51ccc7aff88"],
["/static/css/main.684a4bea.css", "a41a7ce72d99b89237e3e60c76506276"],
["/static/js/main.bb11741c.js", "8af954c9e9bda6d129b0993da30b56e0"],
[
"/static/media/chivo-latin-300.39a5f33a.woff",
"39a5f33a47eb57c29226812e81ef5568"
],
[