Skip to content

Instantly share code, notes, and snippets.

View lucaspatel's full-sized avatar

Lucas Patel lucaspatel

View GitHub Profile
@MakeStuffWithAI
MakeStuffWithAI / parallels_trial_fix.sh
Last active February 9, 2022 10:20
Parallels Trial FIX / Reset
### DISCLAIMER: This code will delete all personal files regarding
###. your Parallels 17 installation and should fix any of the common
###. trial period bugs once you reinstall.
###. I created this for personal use but found there were so many
###. with a similar bug that I decided to share it.
### If you are actively using Parallels for longer than the trial
### period or using it for commercial purposes, you MUST register
### it or it is considered software piracy.
sudo rm -rfd ~/library/preferences/com.parallels*
@bxparks
bxparks / parseflags.sh
Last active February 21, 2024 12:07
Simple Bash Shell Command Line Processing Template
#!/bin/bash
#
# Self-contained command line processing in bash that supports the
# minimal, lowest common denominator compatibility of flag parsing.
# -u: undefined variables is an error
# -e: exit shell on error
set -eu
function usage() {
#!/usr/bin/env python3
"""
The idea here is to have one demo of each common argparse format
type. This is useful for me to be able to copy/paste into a new
script and have something to quickly edit and trim down to get
the functionality I need.
Expect this file to grow/change as I need new options.
This is, however, a working example. I hate examples that don't
@pchhetri
pchhetri / README.md
Last active May 6, 2025 15:07
OS X iMessage (Messages) database merger

OS X iMessage (Messages) database merger

Use it at your own risk! You might end up worse than before. Backup everything beforehand. Twice.

If you have the Messages app setup in multiple Macs with the same Apple ID you may end up with iMessages (or SMS) scattered around all of these Macs. This is because after a certain time the new iMessages (or SMS) recevied will cease to push to devices afer a certain time has elapsed. Thus, if a computer has been offline for some period of time it won't get the new iMessages.

Each Messages instance stores the information in a SQLite database, to consolidate all these databases run the script below. This is where the Messages app stores the SQLite database under ~/Library/Messages, the folder contents will look like as follows:

  • chat.db