Skip to content

Instantly share code, notes, and snippets.

View benyitzhaki's full-sized avatar

Ben Yitzhaki benyitzhaki

View GitHub Profile
@benyitzhaki
benyitzhaki / macos-dev onboarding
Last active March 27, 2024 14:45
After, ensure you fix your shell according to this https://github.com/benyitzhaki/dotfiles
#!/bin/bash
# make dir for development
mkdir ~/Development
# install brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
# Run these two commands in your terminal to add Homebrew to your PATH:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
@benyitzhaki
benyitzhaki / Find Search Empty s3 buckets AWS Lambda (python 3.7)
Last active September 6, 2020 14:09
AWS Lambda to find all empty buckets in AWS S3 account
import json
import boto3
import array
s3 = boto3.resource('s3')
def lambda_handler(event, context):
empty_buckets = [];
for bucket in s3.buckets.all():
is_empty = [] == [i for i in bucket.objects.limit(1).all()]
{"lastUpload":"2019-07-31T13:46:45.430Z","extensionVersion":"v3.4.1"}