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 / 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({