Skip to content

Instantly share code, notes, and snippets.

shadowy super coder

Alex MacCaw maccman

shadowy super coder
View GitHub Profile
View use-dimensions.ts
import { RefObject, useMemo, useLayoutEffect, useRef, useState } from 'react'
type DOMRectRef = [rect: DOMRect, ref: RefObject<HTMLDivElement>]
export const useDimensions = ():DOMRectRef => {
const ref = useRef<HTMLDivElement>(null)
const [rect, setRect] = useState<DOMRect>(DOMRect.fromRect())
const resizeObserver = useMemo(() => {
View DefaultImage.js
import React, { Component } from 'react';
export default class DefaultImage extends Component {
state = {
error: null
onError = (error) => {

Sales candidate:


You'd be an integral part of a small, but experienced, sales team and would be responsible on day 1 for closing deals, creating & implementing growth strategy, having a keen eye for product and market opportunity, and ensuring customers are successful. Competitive base & variable comp.


  • 2-4 yrs experience in customer facing role (ex. sales, sales engineering, account management), preferably at B2B startup. If in sales, has been in closing role before. If not previously in sales, has desire to get into sales role.
  • Work out of SF office everyday.|

Keybase proof

I hereby claim:

  • I am maccman on github.
  • I am maccman ( on keybase.
  • I have a public key ASBW2l7Vjcl9iw1Q8voOYhUKRsWGM0BrfIbpwr7uGaFIkQo

To claim this, I am signing this object:

maccman / show.erb
Created Dec 26, 2016
Clearbit Reveal/Drift integration
View show.erb
drift.on('ready',function(api, payload) {
api.showWelcomeOrAwayMessage(<%== @options.to_json %>);
View Clearbit Connect Inbox

To install Clearbit Connect for Google Inbox, follow the instructions below:

  1. Install the Chrome extension
  2. Navigate to
  3. Paste the following into the URL bar. Note that Chrome may remove the javascript: prefix when pasting - make sure to add it back in.

javascript:(localStorage.CB_INBOXBETA = true) && location.reload()

It should look like this:

maccman / batch_request.csv
Last active Aug 4, 2021
Clearbit Batch Example
View batch_request.csv
maccman / user_signup.rb
Created Feb 25, 2016
Clearbit & integration
View user_signup.rb
class UserSignup
# We're using a job queuing service called Sidekiq
# so that signups are processed and pushed to
# asyncronously.
include Sidekiq::Worker
attr_reader :user, :lookup
def perform(user_id)
# Find the user by ID
maccman /
Last active Aug 29, 2015
Clearbit Tech Detect

Clearbit Tech Detect

Clearbit indexes the following technologies:

Name Type
Google Widgets google_widgets
Twitter Badge twitter_badge
Google Analytics google_analytics
Omniture Adobe Analytics omniture_adobe_analytics
maccman /
Last active Aug 29, 2015
Clearbit API Changelog

Clearbit API versions

Your API version controls the API and webhook behavior you see (e.g. what properties you see in responses, what parameters you’re permitted to send in requests, etc.). Your version gets set the first time you make an API request. When we change any of our APIs in a backwards-incompatible way, we release a new dated version, but to avoid breaking your code, we don’t change your version until you're ready to upgrade.

How can I upgrade versions?

Each of Clearbit's APIs is versioned separately. You can set the API version on a per-request basis, or globally in your dashboard. It's a good idea to keep the API version you're using up to date - we're often pushing shiny new data attributes.

API changelog