This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react" | |
import { CognitoUser } from "@aws-amplify/auth" | |
import { useAuth } from "./hooks" | |
import { SignInInput } from "./types" | |
interface AuthState { | |
user: CognitoUser | null | |
signIn(input : SignInInput): Promise<void> | |
signOut(): Promise<void> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable "app_domain" { | |
type = string | |
} | |
variable "app_hostname" { | |
type = string | |
} | |
variable "app_bucket" { | |
type = string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import csv | |
import boto3 | |
dynamodb = boto3.resource('dynamodb') | |
def main(): | |
if len(sys.argv) != 3: | |
print("Usage: csv_to_dynamodb.py tableName filename") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add this function to your .bash_profile or .zshrc | |
# | |
# usage (all files): deepgrep 'my[Expression]' | |
# usage (filtered files): deepgrep '*.go' MyString | |
# | |
# if your file filter uses a glob wildcard, enclose it in quotes | |
# | |
deepgrep() { | |
if [[ $# -eq 0 || $# -gt 2 ]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// packet.swift | |
// | |
// As CoreMIDI/MIDIPacket exposes the 'data' member as a Tuple in Swift, this | |
// solution accepts a varying size [UInt8] and returns the corresponding tuple. | |
// Usage is as follows: | |
// | |
// packet.data = packetDataFromBytes(data: myArray) | |
// | |
// Created by James Ranson on 12/19/20. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// TextView.swift | |
// TextView provides a scrollable, read-only, clipboard-copyable text field | |
// for use with SwiftUI macOS apps. Because it uses NS* classes, it is | |
// not compatible with iOS, tvOS, etc. | |
// | |
// Created by James Ranson on 12/19/20. | |
// | |
import Foundation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# PREREQUISITES | |
# | |
# fswebcam (sudo apt-get install fswebcam) | |
# imagemagick (sudo apt-get install fswebcam) | |
# lighttpd (sudo apt-get install lighttpd) | |
# ffmpeg (wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-armhf-static.tar.xz) | |
# |