Skip to content

Instantly share code, notes, and snippets.

View bentonmize's full-sized avatar

Benton Mize bentonmize

  • Dexcom TypeZero
View GitHub Profile
@bentonmize
bentonmize / traverse.ts
Created May 16, 2023 14:48
Recursive S3 folder traversal in TS
const getKeysFromPrefix = async (s3: S3Client, prefix: string, bucket: string) => {
const keys = await s3.send(new ListObjectsCommand({
Bucket: bucket,
Delimiter: '/',
Prefix: prefix
})).then(response => {
if(response.CommonPrefixes) {
// Recursive call to go into folders
const promises = []
response.CommonPrefixes.forEach(p => promises.push(getKeysFromPrefix(s3, p.Prefix, bucket)))
@bentonmize
bentonmize / plugin.kts
Created August 16, 2024 14:36
LivePlugin basic hello replacement
import com.intellij.codeInspection.*
import com.intellij.openapi.project.Project
import com.intellij.psi.*
import com.intellij.psi.util.elementType
import liveplugin.registerInspection
import liveplugin.show
// depends-on-plugin com.intellij.java
registerInspection(HelloWorldInspection())