Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am dzogrim on github.
  • I am dzogrim (https://keybase.io/dzogrim) on keybase.
  • I have a public key ASABEP5VljaJrfcyJcbNeFp0fft2IeBja78qxFn3E4EnXAo

To claim this, I am signing this object:

@dzogrim
dzogrim / MessagesAttachmentsCleanUp.sh
Last active February 7, 2025 18:11
macOS Messages App attachments clean-up (this will remove attachments from Messages App history!)
#!/bin/bash
## macOS 'Messages.app' attachments clean-up
## Main known media formats files will be moved to trash to save space
## Copyleft (C) 2018-2019 dzogrim
## dzogrim < dzogrim [@] dzogrim [.] pw >
#VERSION="1.0 (2018-04-07)" # initial
#VERSION="1.1 (2018-05-28)" # sort garbage
@dzogrim
dzogrim / ThisMacInfo.sh
Last active November 19, 2019 17:01
macOS Display info for Mac computers
#!/bin/bash
## macOS Display info for Mac computers
# Set cocoaDialog command since it is probably not in PATH
# Try `sudo port install -fc CocoaDialog`
# Or download binary application here: https://slack-files.com/T7HLMPFC2-F91NUPD5J-843dfef276
cocoaDialog="/Applications/MacPorts/CocoaDialog.app/Contents/MacOS/CocoaDialog"
checkTools()
@dzogrim
dzogrim / updateGitLabs.sh
Last active September 27, 2019 15:22
Updates and clean private git local repositories
#!/bin/bash
NAME=$(basename "$0")
# Customized colors
export cRST='\033[0m' \
cRed='\033[31;1m' cDRed='\033[31m' cRedBG='\033[41;1m' cDRedBG='\033[41m' \
cGreen='\033[32;1m' cDGreen='\033[32m' cGreenBG='\033[42;1m' cDGreenBG='\033[42m' \
cBlue='\033[34;1m' cDBlue='\033[34m' cBlueBG='\033[44;1m' cDBlueBG='\033[44m' \
cYellow='\033[33;1m' cDYellow='\033[33m' cYellowBG='\033[43;1m' cDYellowBG='\033[43m' \
@dzogrim
dzogrim / installed_apps.sh
Created January 26, 2019 18:22
Easily spot difference between 2 Mac computers installed macOS applications
#!/bin/bash
set -e
shopt -s extglob
## The tool was designed to easily spot difference between 2 Mac computers installed macOS applications.
## Copyleft (C) 2016-2019 dzogrim
## dzogrim < dzogrim [@] dzogrim [.] pw >
#VERSION="1.2 (2019-01-26)"
DropboxPath="Dropbox/Private/_SyncThat/confInfos"
@dzogrim
dzogrim / sortAppDownload.py
Created February 3, 2019 13:21
Sort many versions of downloaded application directories and keep the latest version
#!/usr/bin/python3
# -*- coding: utf8 -*-
#-- Need installed `py37-setuptools` & `py37-pip`
import os, os.path
import re
import shutil
import sys
from collections import OrderedDict as ODict
@dzogrim
dzogrim / animateBurstPhotos.sh
Created February 3, 2019 13:53
Make a GIF animation from "burst" continuous shooting several photographs
#!/bin/bash
## Copyleft (C) 2017 dzogrim
## dzogrim < dzogrim [@] dzogrim [.] pw >
#VERSION="1.0 (2017-08-20)"
#Delay="1.45"
Delay="1x8" #the animation should play a frame every 1/8 of a second
@dzogrim
dzogrim / hideDesktop.sh
Last active February 3, 2019 15:14
De/activate macOS Desktop icons
#!/bin/bash
## This tool will de/activate macOS Desktop icons
##-- dzogrim < dzogrim [@] dzogrim [.] pw >
#VERSION="1.0 (2015-03-24)"
##-- * Activate or hide OS X Desktop (and icons)
# ===============================================
# Configuration
@dzogrim
dzogrim / check_redir.sh
Last active February 14, 2019 15:14
Parallelize many curl requests and return OK or not
#!/bin/bash
set -x -e
expectedCode=200
log_file="/tmp/$(basename $0).log"
input_links="${HOME}/Documents/redirections.url.txt"
mycurl(){
redirection="$1"
@dzogrim
dzogrim / objective-see.sh
Last active February 15, 2019 21:32
Download all excellent Objective-See products from Patrick Wardle
#!/bin/bash
base_URL="https://objective-see.com/products.html"
dest_DIR="${HOME}/Downloads"
file_EXT="zip"
installers=(BlockBlock DoNotDisturb LuLu OverSight RansomWhere ReiKey WhatsYourSign)
[[ ! -d "${dest_DIR}" ]] && exit 1
[[ ! "$( which curl )" ]] && exit 1