Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en">
<head>
<style></style>
<meta
name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover"
/>
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<script async="" src="https://www.youtube.com/iframe_api"></script>
@adamwatters
adamwatters / planetparadise.html
Created September 16, 2019 18:18
planet paradise
<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>Document</title>
</head>
<body>
<div class="sign">
<span class="sign__word">WELCOME</span>
<!-- COLLECTIVE WIDGET CODE START -->
<div
class="shopsense-widget"
style="text-align:center"
data-options="%7B%22widgetId%22%3A%225d7019bb1b8ceefa18b86f63%22%2C%22pid%22%3A%22uid8729-42782973-10%22%2C%22url%22%3A%22https%3A%2F%2Fapi.shopstyle.com%2Fapi%2Fv2%22%7D"
>
<script
id="shopsensewidget-script"
src="//shopsensewidget.shopstyle.com/widget-script.js?cb=1567627640986"
import { debounce } from "lodash";
class Index extends React.Component {
static async getInitialProps({ query }) {
return query;
}
state = {
documentScrolled: false,
brandingReady: false

Keybase proof

I hereby claim:

  • I am adamwatters on github.
  • I am adamwatters (https://keybase.io/adamwatters) on keybase.
  • I have a public key ASAd67aEZLvBAl2Py4DIBEdDdhmPxT5-un1Hk0iU02U81go

To claim this, I am signing this object:

@adamwatters
adamwatters / preparedRecord.json
Created March 9, 2019 01:47
Data for Algolia
[
{
"objectID": 36463,
"primaryImageSmall": "https://images.metmuseum.org/CRDImages/as/web-large/DP145641.jpg",
"title": "The Actors Ichimura Uzaemon and Arashi Sangorō",
"artistDisplayName": "Katsukawa Shunshō",
"artistDisplayBio": "Japanese, 1726–1792",
"artistBeginDate": "1726",
"artistEndDate": "1792",
"objectDate": "ca. 1773",
@adamwatters
adamwatters / example.json
Last active March 9, 2019 00:18
example of record
{
"objectID": 36108,
"isHighlight": false,
"accessionNumber": "1975.268.139",
"isPublicDomain": true,
"primaryImage": "https://images.metmuseum.org/CRDImages/as/original/1975_268_139_d.JPG",
"primaryImageSmall": "https://images.metmuseum.org/CRDImages/as/web-large/1975_268_139_d.JPG",
"additionalImages": [],
"constituents": null,
@adamwatters
adamwatters / Netlify-CMS.txt
Last active February 13, 2019 01:19
Netlify-CMS Notes
Getting Started
1) local development requires url for auth login - confusing if you have two sites
2) maybe would be nice if test backend used local storage? https://github.com/netlify/netlify-cms/blob/master/packages/netlify-cms-backend-test/src/implementation.js
Notes on: https://www.netlifycms.org/docs/add-to-your-site/
* adding to your site should be intuitive, should not require Netlify template
1) no mention of https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-netlify-cms
2) not clear that you need to add the static directory (link to gatsby docs)
3) wrong version <script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
@adamwatters
adamwatters / isDead.js
Created February 15, 2017 19:19
Checking if a piece in the game of Go is dead.
const spaceAt = (board, x, y) => {
if (x < 0 || x > board[0].length - 1) {
return 'outOfBounds'
}
if (y < 0 || y > board.length - 1) {
return 'outOfBounds'
}
return {content: board[y][x], x: x, y: y}
}
@adamwatters
adamwatters / event-loop.markdown
Created November 17, 2016 02:48
what the heck is the event loop?

What is the JS event loop?

How does JS even work?

  • v8 (chromes run time)
  • single threaded
  • callbacks

js says...

"a signle-threaded non-blocking asynchronous concurrent language"