Skip to content

Instantly share code, notes, and snippets.

View smcalilly's full-sized avatar
💭
waiting on ai to do my work

Sam McAlilly smcalilly

💭
waiting on ai to do my work
View GitHub Profile
@smcalilly
smcalilly / bookstores-initial-import-20200911.sql
Created January 31, 2025 17:23 — forked from rmloveland/bookstores-initial-import-20200911.sql
Data set created by downloading a list of bookstores from American Bookseller Association. Geometries added by getting lon/lat using geocoding based on some Tiger/LINE data.
This file has been truncated, but you can view the full file.
CREATE TABLE IF NOT EXISTS public.bookstores (
id UUID NOT NULL DEFAULT gen_random_uuid(),
name STRING NOT NULL,
url STRING NULL,
phone STRING NULL,
address STRING NOT NULL,
description STRING NULL,
geom GEOMETRY NULL,
CONSTRAINT "primary" PRIMARY KEY (id ASC),
INVERTED INDEX bookstore_geom_idx (geom),
@smcalilly
smcalilly / kitty-terminal.md
Last active June 24, 2021 21:48
add your kitty's computer paw prints
swwwwwwwwwwwz
execute: gffffffb_
@smcalilly
smcalilly / js-function-object-cheatsheet.md
Last active March 17, 2021 01:27
javascript function and object cheatsheet

What is this?

This is Yet Another Javascript Guide: a quick guide to Javascript functions and objects. The intended audience is somebody who knows a language like Ruby or Python and has somehow avoided learning Javascript, yet found themselves working on a Javascript project. This is the Cliff's Notes for Javascript. This is for cramming, for all-nighters, for people who need to get things done.

This guide will demonstrate how to declare functions, pass arguments in functions, and use the arguments inside a function. It will also explain the basics of a Javascript object. Hopefully, this information will help to understand how destructuring works when you want to pass an object into a function. Destructuring is a common pattern in present-day Javascript projects, like React or Gatsby or ExpressJS.

Contents

@smcalilly
smcalilly / graphqlClient.js
Last active July 10, 2020 02:06
A basic GraphQL service for AWS AppSync with Okta authentication
import AWSAppSyncClient, { AUTH_TYPE } from 'aws-appsync';
import gql from 'graphql-tag';
import * as queries from './queries';
import * as mutations from './mutations';
function configureAppSyncClient() {
const token = JSON.parse(localStorage.getItem('okta-token-storage'))
const config = JSON.parse(localStorage.getItem('config'))
const client = new AWSAppSyncClient({