Skip to content

Instantly share code, notes, and snippets.

View benbjurstrom's full-sized avatar

Ben Bjurstrom benbjurstrom

View GitHub Profile
@benbjurstrom
benbjurstrom / exmaple.json
Created April 20, 2024 16:47
exmaple json schema
{
"$id": "https://example.com/person.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Person",
"type": "object",
"properties": {
"firstName": {
"type": "string",
"description": "The person's first name."
},
@benbjurstrom
benbjurstrom / image.blade.php
Created December 27, 2023 18:25
Laravel Blade Image Component
<div @class(['overflow-hidden', $class])>
<div
class="blur-lg bg-cover bg-no-repeat"
style="background-image: url('{{$placeholder}}');"
>
<img
:key="{{$id}}"
class="h-full w-full transition duration-200 ease-in opacity-0"
src="{{$src}}"
onload="this.classList.remove('opacity-0');
@benbjurstrom
benbjurstrom / prune-aws-sdk.sh
Created April 2, 2023 17:17
Laravel Vapor: prune unused modules from aws/aws-sdk-php
#!/bin/bash
for Folder in AccessAnalyzer \
Account \
Acm \
ACMPCA \
AlexaForBusiness \
Amplify \
AmplifyBackend \
AmplifyUIBuilder \
@benbjurstrom
benbjurstrom / Code.gs
Last active September 10, 2024 10:16
PurgeOldEmails
/*
|--------------------------------------------------------------------------
| PurgeOldEmails
|--------------------------------------------------------------------------
| https://gist.github.com/benbjurstrom/00cdfdb24e39c59c124e812d5effa39a
|
*/
// Purge messages automatically after how many days?
var DELETE_AFTER_DAYS = 7
@benbjurstrom
benbjurstrom / iotButton2IFTTT.js
Created May 16, 2016 01:12
Amazon IOT Button To IFTTT
/**
* An Amazon Lambda function to send an IOT button request to an IFTTT Maker endpoint.
* Code adapted from SNS2IFTTT by Danilo Poccia [https://github.com/danilop/SNS2IFTTT/blob/master/index.js]
*/
var http = require('http');
var iftttMakerSecretKey = '<YOUR IFTTT MAKER SECRET KEY>';
/**
* When invoked from an IOT Button press the event payload contains the following:

Keybase proof

I hereby claim:

  • I am benbjurstrom on github.
  • I am benbjurstrom (https://keybase.io/benbjurstrom) on keybase.
  • I have a public key ASDk-tAYVrIgkxhMUx9Nv2IzbtlT1LdcBxkCDxM4X7OGJgo

To claim this, I am signing this object: