Gregory Varghese
  • About Me
  • Labs
  • GitHub
  • My Work Setup
  • My Photography Blog
  • Contact Me
  • About Me
  • Labs
  • GitHub
  • My Work Setup
  • My Photography Blog
  • Contact Me
  • Categories
  • All
  • Administration
  • Solutions
  • Troubleshooting
  • Tips and Tricks
  • Development
25th August 2025
DevelopmentPythonToolsUtilities

Introducing AnonymizeReviewer: Remove Author Metadata from Word Docs Without Losing Edits

When youโ€™re collaborating on a Microsoft Word document, tracked changes and comments are essential tools. However, when it's time to share those files outside your team, another concern often arises: the names behind every comment and edit are embedded directly within the document.

There are times when anonymity is important. Whether youโ€™re simplifying client reviews, preparing materials for a broader audience, or just removing unnecessary distractions, Word doesn't make it easy to cleanly strip names without accepting all changes or removing valuable context.

To solve that problem, I created AnonymizeReviewer, a lightweight Python script that lets you anonymize Word files while preserving everything that matters.

Microsoft Word includes a feature called โ€œRemove personal information on save.โ€ While helpful in theory, it behaves inconsistently depending on your version and settings. It also doesnโ€™t catch all the places author names can appear.

Here are some of the areas where Word stores author names:

Manually scrubbing each of these is time-consuming and prone to error. Itโ€™s easy to miss something. Thatโ€™s why I built a more dependable solution.

AnonymizeReviewer reads the .docx file as a zip archive, scans its internal XML files, and replaces all instances of the original author name with a placeholder or alternate name of your choosing. It does this without altering the tracked changes or comments themselves.

Key features include:

First, clone the repository and install the Python dependency:

To run in interactive mode with file picker prompts:

To run with arguments:

To batch-process all .docx files in a folder:

Files that already end in โ€œ - Anonymized.docxโ€ will be skipped automatically to avoid duplication.

This tool originated from a real-world use case. I needed a way to hand off tracked-change documents for client review without exposing internal names. Word did not provide a clean solution, and most online options were either unreliable or required uploading sensitive files.

By targeting the actual structure of a .docx file and addressing all areas where names can be stored, AnonymizeReviewer fills that gap, giving you control over what you share.

The project is available on GitHub at https://github.com/gregvarghese/AnonymizeReviewer

Pull requests and feedback are welcome. If you have ideas for additional features, such as redacting specific comment content or cleaning embedded metadata beyond names, I would love to hear them.

This project is licensed under the MIT License.

The software is provided as is, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement.

Continue Reading
0
76
8th May 2025
AdministrationCloudDigital OceanLinuxMacSolutionsTerminal

How to Extract SSL Certificates from a PFX File on macOS

If youโ€™ve ever been handed a .pfx file and told to โ€œjust upload the certificate,โ€ you know the pain thatโ€™s coming.

PFX (PKCS#12) files bundle your private key, SSL certificate, and any intermediate certificates into one encrypted file. Thatโ€™s great until you actually need to extract those pieces for something like an NGINX server, AWS load balancer, or third-party CDN that wants them all separately.

MacOS has OpenSSL built in, which is all you need. Hereโ€™s a simple shell script I use to generate the cert, private key, and chain in one shot and make them clipboard-ready for easy pasting.

Save the following as extract-ssl-from-pfx.sh:

Make it executable:


Then run it:


Follow the prompts. Youโ€™ll end up with three files and the contents ready to paste one by one wherever you need them.

Your private key is sensitive. Please donโ€™t leave it lying around. Store it securely or delete it after use.

This script saves me time every time I deal with certificates. Hopefully, it does the same for you. If you have improvements or tweaks, Iโ€™d love to hear them.

Continue Reading
0
174
19th August 2024
AIDevelopmentLaravelLaravelMacMacPHPPHPTerminalTips and Tricks

Supercharge Your Laravel Development and Get AI to Understand Your Models

Hey there, Laravel enthusiasts! Today, I'm diving into a nifty trick that'll make getting AI to understand your Laravel model structures a breeze. We'll harness the power of bash scripting and AI to analyze our migrations quickly and efficiently. Let's get started!

As our Laravel projects grow, so does the complexity of our database structures. Migrations pile up, relationships intertwine, and before you know it, you're drowning in a sea ofย Schema::createย andย upย functions. Wouldn't it be great to get a bird's-eye view of our models without manually sifting through dozens of files? What if you could get AI to understand your Laravel project without adding every file to the chat window?

Here's where our dynamic duo comes in a clever bash one-liner and your favorite AI chat tool (like ChatGPT or Claude). We'll use bash to extract the relevant parts of our migrations and then feed that information to an AI for analysis and insights.

Here's the one-liner code to copy and paste:

First, let's break down our bash sorcery to understand what's going on in an easier-to-read format:

Just add | pbcopy to have it copied directly to your clipboard on Mac:

This command does the following:

Please copy the entire output from your terminal and paste it into your AI chat of choice with your preferred prompt. I usually start with this prompt:

Generate a diagram

Here are some additional prompts you can optionally pair with the output to extract valuable insights and improvements:

There you have it, folks! With this simple bash one-liner and the power of AI, you can transform how you analyze and understand your Laravel database structures and output code. Give it a try on your next project, and watch your productivity soar!

Remember, tools like these are meant to augment your skills, not replace them. Always review AI suggestions critically and trust your developer instincts.

Continue Reading
0
257
30th July 2024
AdministrationPowerShellTips and TricksToolsWindows

How to Take Ownership of Files and Folders Using PowerShell

Ever had to take ownership of a bunch of files and folders? It's a pain, right? Well, not anymore!

Picture this: You've just gotten an external hard drive from a dead computer and need to access the files. But wait! You don't have the correct permissions. I had to do this, and setting the file permissions through Explorer was failing randomly. It appears that the folders all had different permissions, and the propagation was failing.

I've got a PowerShell script that'll save you time. It does two things:

First, here's the script. Don't worry, I'll break it down for you:

Let's break this down a bit:

There you have it, folks! A powerful little script to take control of your files and folders. No more permission headaches, no more "access denied" nightmares โ€” just pure, unadulterated file access bliss.

Got questions? Hit me up in the comments. And don't forget to share this with your IT buddies โ€“ they'll thank you later!

Happy scripting!

Continue Reading
1
247
16th July 2024
Uncategorized

How to add case insensitive where in Laravel

Have you ever found yourself writing the same complex database queries repeatedly? Yeah, me too. It's frustrating, time-consuming, and, let's face it, not the best use of our coding superpowers.

I needed to search some tables for case-insensitive values and discovered that Laravel doesn't have a native function in eloquent, or it's entirely possible that I missed it. Today, we will tackle this problem head-on by diving into the world of Laravel Eloquent macros. If you've never used them, this will be a game-changer for your productivity.

Picture this: You're working on a project where you frequently need to perform case-insensitive searches across multiple columns. Or maybe you're constantly writing complex ordering logic to handle null values. Sound familiar?

If you're nodding your head, you're not alone. This is what I call "Query Repetition Syndrome," and it's a common ailment among Laravel developers.

Enter Eloquent macros - your new secret weapon against repetitive queries. These bad boys allow you to extend Eloquent's query builder with custom methods. It's like giving your Laravel app query superpowers!

Let's break down how to implement this solution step-by-step.

First things first, we need a place to house our macros. Let's create a new service provider:

Open up that freshly minted MacroServiceProvider.php, and let's give it some structure:

Let's tackle that case-insensitive search problem with a whereInLike macro:

While we're at it, let's add a couple more handy macros:

Don't forget to tell Laravel about your new macros. Add this line to your config/app.php:

Now for the fun part - using your new macros:

By implementing these Eloquent macros, we've solved our Query Repetition Syndrome. Instead of writing the same complex queries over and over, we have reusable, eloquent (pun intended) methods that make our code cleaner and more efficient.

But here's the kicker - this is just the beginning. You can create macros for any repetitive query pattern in your projects. The possibilities are endless!

Eloquent macros are like a Swiss Army knife for your database queries. They're powerful and flexible and can save you tons of time and headaches.

Remember, the goal here is to work smarter, not harder. By identifying repetitive patterns in your queries and turning them into macros, you're setting yourself up for cleaner, more maintainable code in the long run.

Now, I'm curious - what repetitive query patterns have you encountered in your Laravel projects? Please drop a comment below to share your macros or share some macro solutions!

Happy coding, and may your queries be ever elegant!

Continue Reading
0
192
8th July 2024
AdministrationMacTerminal

How to Move Files by Partial File Name to New Directory on Mac using a shell script

When it comes to photo editing, efficiency is key. Recently, I faced a challenge where a subject picked out 100 priority photos from a larger batch. Given the sheer number of images, manually sorting them wasn't practical. All pictures from my SLR were named in the DCIM_# format, so I noted the last five numbers of the selected files. To streamline the process, I wrote a shell script that automatically moves the chosen files to a new folder, allowing me to focus on the priority images first. Iโ€™m sharing this script to help others enhance their photo editing workflow.

Create the Shell Script:

Save the Script:

Make the Script Executable:

Run the Script:

Verify the Results:

By following these steps, you can efficiently manage and prioritize your photo editing tasks, saving valuable time and effort. This shell script can be customized and expanded to suit various file management needs, making it a versatile tool in your workflow.

Continue Reading
0
212
29th March 2024
DevelopmentLaravelPHPPHPStorm

How to Automatically Login into Laravel App in Your Local Dev Environment

I often find myself spinning up Laravel projects for prototypes and idea testing and then letting them sit until I can pick them back up. Logging in whenever I start work gets annoying, and there's no point in manually logging in to my local instance since my account is the admin. Fortunately, there are a few solutions to automate this process in Laravel. I'll delve into the various methods to automatically log in to your Laravel app in your local development environment, enhancing your workflow and boosting productivity.

One approach to automating the login process for the Laravel application is session-based auto-login. This method involves setting up a mechanism that automatically logs in a predefined user whenever the application is accessed in the local development environment.

Each solution below assumes you've seeded or registered a local user account in your database.

You can create a custom route in your Laravel routes file (routes/web.php) that triggers the auto-login functionality.

When you access the /auto-login route in your local development environment, Laravel will automatically log in the specified user, redirecting them to the desired page (in this case, /dashboard).

Another method to automate your Laravel application's login process is leveraging custom middleware designed for auto-login functionality. This approach provides more flexibility and control over the auto-login process, allowing you to define custom logic and conditions for authentication.

Generate a new middleware using the Artisan command make:middleware.

Register the custom middleware in the HTTP kernel (app/Http/Kernel.php) to apply it to the desired routes or groups of routes.

This method allows you to log in automatically as soon as you load the application, and it is the method I use most often. I added a check to ensure that the environment is local.

if ($this->app->environment('local')) {
$user = User::first();
if (isset($user)) {
$this->app['auth']->setUser(User::first());
}
}

If you don't have the user table seeded with a user, the above code will cause an error when running the seeders. I tweaked the code to check for the table's existence to avoid the error when running seeders.

Sometimes, you might want to seed your database with an admin user for testing purposes. Here's how you can do it:

Generate a new seeder class using the Artisan command make:seeder.

Within the generated UserSeeder class, define the logic to create an admin user.

Finally, run the seeder using the Artisan command db:seed.

Following these steps, you can seamlessly integrate auto-login functionality into your Laravel application's local development environment, reducing the time and effort spent on repetitive login tasks. Additionally, seeding your database with an admin user ensures that you have a user account available for testing and development purposes.

Continue Reading
0
398
11th January 2024
AdministrationMacMacMacFusionpCloudSoftwareTerminalTips and TricksTools

How to enable MacFuse/PCloud Drive on Mac Sonoma 14.2.1

I recently upgraded to Mac Sonoma 14.2.1 and MacFuse stopped loading which affected my ability to load PCloud and NTFS drives. I spent a few days trying to troubleshoot everything and in the end it turned out I had to disable Mac System Integrity Protection to get everything to load. I'm sharing in case it helps anyone else.

To disable SIP on your Mac Sonoma for extensions like MacFuse and pCloud Drive:

Note: Disabling SIP poses security risks. Re-enable it once you've installed the necessary extensions. Only disable SIP when necessary and understand the potential risks involved.

Continue Reading
0
464
25th September 2023
ApplicationsExcelMacSoftwareTips and TricksToolsUtilities

How to Delete a Row in Excel Using the Elgato Stream Deck

Recently I was working on a massive Excel Spreadsheet and needed to manually review each entry and clean up rows that were no longer needed. The Elgato Stream Deck came in handy for a quick shortcut so I thought I'd share it in case anyone else can use it.

I took this opportunity to practice creating the first of what I hope are many training videos. This took me around 30 minutes to do from start to finish as I had to learn the video editing software including how to record, how to split and edit, and how to add text overlays. Hopefully the next videos will be faster but it was a fun exercise and I hope someone else finds it useful.

Continue Reading
0
543
19th September 2023
bun.shDevelopmentMacSolutionsTerminalTroubleshooting

Installing font awesome pro with bun

After recently switching to bun.sh, I was trying to install Font Awesome Pro. It uses a private registry but their docs have not been updated to support non-npm package managers and bun does not yet support .npmrc files.

You can configure a private registry using an organization scope. First, you must get your auth token from your paid Font Awesome account by going to your account page, scrolling down to the Tokens section, and copying the token.

Copy and paste this string, and replace YOUR_TOKEN_HERE with the token you copied above:

Open the terminal and enter these commands:

Paste in the config above with your token and then hit CTRL+X to quit, and Y to save when prompted. Now you should be able to run

Continue Reading
2
453
Page 1 of 10
  • 1
  • 2
  • 3
  • …
  • 10
Older Posts

Tags

.NET (4) Administration (24) AI (3) Applications (13) ASP.NET (8) ASP.NET MVC (2) C# (6) Caution (4) Debug (6) Development (23) digital ocean (2) Errors (9) ESET (3) Excel (2) Fix (23) High CPU Usage (2) IIS (3) Javascript (5) jQuery (4) laravel (7) linux (6) Mac (17) MAMP (3) Microsoft (5) NTFS (2) Open Source (3) Outlook (2) Outlook 2011 (4) Photography (2) php (4) Programming (9) review (2) Sitecore (2) Software (7) Solutions (44) SQL (4) SSL (3) Tips (36) Tools (5) Troubleshooting (27) Useful (23) Utilties (8) Windows (14) Windows 7 (4) Windows Server (2)

Categories

  • Administration 67
    • Caution 3
    • Cloud 8
      • Cloudflare 1
      • Digital Ocean 6
        • Droplet 5
      • Namecheap 1
    • Hardware 4
      • Drobo 3
    • IIS 2
    • Linux 9
      • Apache 1
      • SSH 7
        • Terminal 4
      • Ubuntu 16.04 1
    • Mac 14
      • Software 5
        • Alfred 1
        • MacFusion 1
        • MAMP 3
        • pCloud 1
        • PHPStorm 1
      • Terminal 9
        • bun.sh 1
    • Review 1
    • Security 6
      • ESET 4
      • Firewall 1
    • SQL 3
      • 2008 1
      • DTSX 1
      • mySQL 1
    • Stupid Tales 2
    • Windows 47
      • Applications 16
      • Malware 2
      • NTFS 2
      • PowerShell 2
      • Software 21
        • Excel 3
        • Outlook 1
        • Peerblock 1
        • Remote Desktop 1
          • RDC 1
        • SourceTree 1
        • Steam 1
        • Synergy 1
        • Visio 1
        • Visual Studio 2013 1
        • Word 1
        • Wordpress 2
          • Hack 2
      • Tips and Tricks 35
      • Tools 24
      • Utilities 20
      • Windows 10 2
      • Windows 7 9
      • Windows 8 4
      • Windows Server 3
        • Windows Server 2008 2
        • Windows Server 2012 2
  • Body Hacking 1
    • Diet 1
    • Soylent 1
  • Development 36
    • AI 3
    • Bitbucket 3
      • Pipelines 3
    • c# 2
    • CouchDB 1
    • Github 3
    • Gitlab 2
    • Open Source 4
    • ORM 1
      • Dapper 1
    • PHP 8
      • Laravel 8
        • Jigsaw 1
    • PHPStorm 2
    • Python 1
    • Sitecore 2
    • SourceTree 1
    • Syncfusion 1
  • Mac 13
    • iCloud 1
    • Outlook 2011 2
    • Safari 1
  • Photography 3
    • Food 1
    • Rockstars 1
    • Uproar Festival 2012 1
    • Wolves 1
  • Products 3
    • Backblaze B2 1
    • Reviews 2
  • Programming 32
    • ASP.NET 7
      • MVC 1
    • AWS 1
      • Rekognition 1
    • C# 3
    • Gatsby 1
    • Javascript 2
    • jQuery 3
      • Fancybox 1
    • MonoTouch 1
    • PHP 7
      • Laravel 7
        • Tinker 1
    • Regex 1
    • Sitecore 2
    • SQL 1
    • SSL 2
    • VBA 2
      • Microsoft Word 1
    • Web Development 10
      • JavaScript 2
    • WinForms 2
  • Raspberry Pi 1
  • Recipe 1
  • Self Experimentation 1
  • Troubleshooting 46
    • Solutions 45
  • Uncategorized 11

Archives

  • August 20251
  • May 20251
  • August 20241
  • July 20243
  • March 20241
  • January 20241
  • September 20232
  • March 20232
  • January 20231
  • November 20221
  • August 20221
  • January 20221
  • October 20211
  • January 20211
  • July 20201
  • May 20201
  • April 20201
  • February 20201
  • September 20191
  • August 20193
  • July 20191
  • June 20191
  • May 20194
  • October 20181
  • July 20181
  • May 20181
  • April 20182
  • November 20171
  • October 20171
  • June 20171
  • May 20171
  • November 20161
  • October 20162
  • September 20161
  • June 20162
  • May 20164
  • February 20161
  • January 20161
  • October 20151
  • September 20151
  • July 20151
  • June 20151
  • May 20153
  • April 20151
  • March 20151
  • February 20151
  • July 20141
  • June 20141
  • May 20141
  • December 20132
  • September 20131
  • July 20131
  • May 20132
  • March 20132
  • February 20131
  • September 20121
  • August 20124
  • July 20121
  • March 20121
  • November 20111
  • September 20114
  • July 20113
  • June 20112
  • February 20111
  • August 20101
  • May 20101
  • October 20071

Continue Reading

Recent Posts

  • Introducing AnonymizeReviewer: Remove Author Metadata from Word Docs Without Losing Edits
  • How to Extract SSL Certificates from a PFX File on macOS
  • Supercharge Your Laravel Development and Get AI to Understand Your Models
  • How to Take Ownership of Files and Folders Using PowerShell
  • How to add case insensitive where in Laravel

© Gregory Varghese 2026 • All rights reserved.

Published with WordPress.