Skip to content

Instantly share code, notes, and snippets.

View benbjurstrom's full-sized avatar

Ben Bjurstrom benbjurstrom

View GitHub Profile

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:

@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:
@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 / 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 / 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 / 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."
},