Skip to content

Instantly share code, notes, and snippets.

@willblaschko
willblaschko / ev.dart
Created December 12, 2020 17:06
Photography EV/F-Stop/ISO/Shutter Speed Calculations - Dart
import 'dart:math';
import 'package:lightmeterv2/models/shutter.dart';
class EV
{
static double luxToFC = 10.763910417;
static double calc(double f, int iso, Shutter sec)
{
double EV = (((log(f * f) / log(2.0)) - (log(sec.getValue()) / log(2.0))) - (log(iso / 100) / log(2.0)));
@willblaschko
willblaschko / index.mjs
Created July 14, 2024 15:15
Delete Old Cognito Records (Reduce Cost)
//
// Run this in Lambda for as long as is required to get through your pool. If you re-run it'll need to skip the keep records,
// but there should be less the second time around
//
import { CognitoIdentityClient, ListIdentitiesCommand, DeleteIdentitiesCommand } from "@aws-sdk/client-cognito-identity";
// Initialize the Cognito Identity Client
const client = new CognitoIdentityClient({ region: "<IDENTITY POOL REGION e.g. us-east-1>" });