Skip to content

Instantly share code, notes, and snippets.

import React, { Children, cloneElement, memo } from 'react'
import PropTypes from 'prop-types'
import get from 'lodash/get'
import { useGetOne } from 'react-admin'
import {
getResourceLinkPath,
} from 'ra-core'
import { makeStyles } from '@material-ui/core/styles'
import ErrorIcon from '@material-ui/icons/Error'
import { Link } from 'react-router-dom'
@calebfaruki
calebfaruki / Upsertion Issues.md
Created May 28, 2019 15:10
Data Parity Notes

Why we can't upsert buildings, spaces, or availabilities.

  • No unique keys other than UUIDs.
  • Addresses don't work because buildings and spaces can have multiple addresses.
  • We can/should assume that KnoPI's data is more correct.

How to handle buildings, spaces and availabilities in Foundation

KnoPI w/o FDTN ID KnoPI has FDTN ID

Keybase proof

I hereby claim:

  • I am calebfaruki on github.
  • I am cfaruki (https://keybase.io/cfaruki) on keybase.
  • I have a public key ASDxZv2j1agbDeI9KkuSqyhNysTse3nUwUz2QilVO7qYcgo

To claim this, I am signing this object:

[56] → git push -u origin deploy-yelp_demo -f --tags
warning: refname '9e104b9d9c0a4f1a5135afe4602149e1592b077f' is ambiguous.
Git normally never creates a ref that ends with 40 hex characters
because it will be ignored when you just specify 40-hex. These refs
may be created by mistake. For example,
git checkout -b $br $(git rev-parse ...)
where "$br" is somehow empty and a 40-hex ref is created. Please
examine these refs and maybe delete them. Turn this message off by
deploy@ip-10-0-3-60 /data/yelp_service_provider/current $ node index.js
/data/yelp_service_provider/releases/20180208193421/index.js:5
var fileName = process.argv[3].html
^
TypeError: Cannot read property 'html' of undefined
at Object.<anonymous> (/data/yelp_service_provider/releases/20180208193421/index.js:5:31)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
@calebfaruki
calebfaruki / gist:4b0998a3d1537eaeb422d4a254af263c
Last active December 27, 2017 16:08
Reverse proxy config
This is how we would like it to be configured.
App environment : Canonical URL
Staging
unpakt/demo : https://demo.unpakt.com
blog/blog_demo : https://demo.unpakt.com/blog
Production
unpakt/production : https://www.unpakt.com
@calebfaruki
calebfaruki / microformats for businesses
Last active August 29, 2015 14:07
example microformat for local business
<div itemscope itemtype="http://schema.org/HealthAndBeautyBusiness">
<meta itemprop="name" content="<!-- -->" />
<meta itemprop="founder" content="<!-- -->" />
<a href="<!-- -->" itemprop="url"></a>
<a href="mailto:<!-- -->" itemprop="email"></a>
<a href="<!-- -->" itemprop="logo"></a>
<div itemprop="geo" itemscope itemtype="http://schema.org/GeoCoordinates">
<meta itemprop="latitude" content="<!-- -->" />
<meta itemprop="longitude" content="<!-- -->" />
</div>
@calebfaruki
calebfaruki / rsPagination.css
Last active August 29, 2015 14:07
Pagination for royalSlider.js
.item {
height: 98px;
width: 98px;
border: 1px solid red;
}
.page {
background-color: #000;
display: inline-block;
border-radius: 10px;
margin: 0 5px;
@calebfaruki
calebfaruki / gist:8fd0a997a7bc112a2390
Last active August 29, 2015 14:06
Placeholder -> Label Animation for HTML Forms
<body>
<fieldset>
<div>
<label for="full_name" class="">Full Name</label>
<input type="text" name="full_name" placeholder="Full Name" />
</div>
<div>
<label for="email" class="">Email Address</label>
<input type="text" name="email" placeholder="Email Address" />
</div>