Skip to content

Instantly share code, notes, and snippets.

View SHi-ON's full-sized avatar
🚀
“Dans une grande âme, tout est grand.”

Shawn Azdam SHi-ON

🚀
“Dans une grande âme, tout est grand.”
View GitHub Profile
@SHi-ON
SHi-ON / restart_pycharm.sh
Last active July 19, 2025 19:13
Gracefully restart PyCharm on macOS from your terminal, with fallback to force quit if needed.
# restart_pycharm.sh
#
# A shell function to gracefully restart PyCharm on macOS.
# Usage: source this file or copy the function into your ~/.zshrc or ~/.bashrc,
# then run `restartPyCharm` from your terminal.
# You may need to verify the Quit PyCharm shortcut key from the menu: Command + Shift + 9
#
# Author: SHi-ON
restartPyCharm() {
@SHi-ON
SHi-ON / my_activity_safari.sh
Created July 19, 2025 19:13
Quickly preview your recent Safari browsing history (last 50 visits) in macOS using Quick Look, with automatic cleanup for repeat use.
# my_activity_safari.sh
#
# Function: myActivitySafari
#
# Description:
# Preview your 50 most recent Safari browsing history entries on macOS,
# using Quick Look. This function queries Safari’s local SQLite history,
# previews the results, and removes the temporary file so it can be run
# again without file conflicts.
#
@SHi-ON
SHi-ON / quit_excel.sh
Created July 19, 2025 19:27
Shell function for macOS to save all open Microsoft Excel workbooks and quit the application safely from the terminal.
# quitExcel.sh
#
# Function: quitExcel
#
# Description:
# Saves all open workbooks in Microsoft Excel and then quits the application,
# using AppleScript. Useful for closing Excel from the terminal and ensuring
# all data is saved.
#
# Usage: