Skip to content

Instantly share code, notes, and snippets.

View guyzyl's full-sized avatar

Guy Zylberberg guyzyl

  • Tel Aviv, Israel
View GitHub Profile
@guyzyl
guyzyl / delete_s3_files.py
Created September 20, 2023 07:08
Delete all files in an S3 bucket including file versions
import boto3
BUCKET_NAME = "my-bucket"
s3 = boto3.resource("s3")
bucket = s3.Bucket(BUCKET_NAME)
bucket.objects.delete()
bucket.object_versions.delete()
@guyzyl
guyzyl / whatsapp_mac_beta_check.py
Created August 18, 2022 08:10
A short Python code snippet that notifies you once a slot opens up on the WhatsApp mac beta.
"""
A short Python code snippet that notifies you once a slot opens up
on the WhatsApp mac beta.
Make sure to install the TestFlight app beforehand, so you don't miss
you chance when a slot opens up.
"""
import os
from datetime import datetime
from time import sleep
import requests
@prologic
prologic / LearnGoIn5mins.md
Last active September 25, 2024 05:41
Learn Go in ~5mins
@mccabiles
mccabiles / nginx.conf
Created September 17, 2019 11:24
Using gzip with Nginx and Vue CLI project
...
gzip on;
gzip_static on;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_proxied any;
gzip_vary on;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
@gadzhimari
gadzhimari / adobe_cc.md
Created November 22, 2018 11:29
Completely Remove Adobe from your Mac in 2 Steps

Step 1

Download and run the Adobe Creative Cloud Cleaner Tool, their multi-app uninstaller and wipe assistant. Adobe does recommend running individual application uninstallers first, your call. Click the Clean All option.

Step 2

Type a one line command in terminal find ~/ -iname "*adobe*" and it's shows up all files which match pattern.

To remove all files

`sudo rm -rf /Applications/Adobe* /Applications/Utilities/Adobe* /Library/Application\ Support/Adobe /Library/Preferences/com.adobe.* /Library/PrivilegedHelperTools/com.adobe.* /private/var/db/receipts/com.adobe.* ~/Library/Application\ Support/Adobe* ~/Library/Application\ Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.adobe* ~/Library/Application\ Support/CrashReporter/Adobe* ~/Library/Caches/Adobe ~/Library/Caches/com.Adobe.* ~/Library/Caches/com.adobe.* ~/Library/Cookies/com.adobe.* ~/Library/Logs/Adobe* ~/Librar

@jaytaylor
jaytaylor / delete-from-v2-docker-registry.md
Last active September 19, 2024 19:03
One liner for deleting images from a v2 docker registry

One liner for deleting images from a v2 docker registry

Just plug in your own values for registry and repo/image name.

registry='localhost:5000'
name='my-image'
curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$(
    curl -sSL -I \
        -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \