Skip to content

Instantly share code, notes, and snippets.

View pa-0's full-sized avatar

Peter Abbasi pa-0

View GitHub Profile
@pa-0
pa-0 / outlook.bas
Created May 22, 2025 00:56 — forked from uncogeek/outlook.bas
Outlook vba
' formatting ticket email as default template request for outlook
' change font to B nazanin, set font-size etc.
Sub FormatSelectedText()
Dim objInspector As Outlook.Inspector
Dim objDocument As Word.Document
Dim objSelection As Word.Selection
Dim objTable As Word.Table
Dim objRow As Word.Row
Dim objCell As Word.Cell
Public referenceDocument As Document
Public lookupDocument As Document
Public activeDictionary As Object
Option Explicit
Sub createAcronymTableFile()
'#####################################################################################################
'# #
'# * Take table of abbreviations from existing document and use it as a separate reference #
'# * Takes ideas from a number of places #
'# * #
@pa-0
pa-0 / readme.txt
Created May 22, 2025 00:50 — forked from marco-sorich/readme.txt
Automate the update of macros of MS Word file
This folder contains scripts to automatically update the VBA macros of
many Word template files.
The intended process of the macro update is as follows:
1. Take one of the Word files to develop the new or updated macros.
2. When development has finished and is properly tested, export the updated macros to files.
3. Export the VBA module "CaliberRMMacros" to the file "CaliberRMMacros.bas" into this folder.
4. Export the VBA form "PleaseWaitForm" to the file "PleaseWaitForm.frm" into this folder.
An additional file "PleaseWaitForm.frx" will be created automatically.
5. Check out all Word template file out of the version control system into folder
@pa-0
pa-0 / rename-authors.bas
Last active May 22, 2025 00:02 — forked from genomewalker/rename-authors.m
Macro to rename authors track changes in a word doc
Sub AuthorTec_ReplaceAuthorName()
Const MacroName = "AuthorTec™ Replace Author Name"
'In XML formatted Word documents (docx, dotx, docm, dotm), this
'macro changes a specified author name on comments and tracked
'revisions. It runs on both Windows and Mac versions of Microsoft Word
'Authored by Richard V Michaels, Microsoft Office Services MVP
'Chief Product Architect of Great Circle Learning, Inc.
'https://www.greatcirclelearning.com
'AuthorTec is a Trademark of Richard V Michaels
Dim doc As Word.Document
@pa-0
pa-0 / script_reloader.ahk
Created May 21, 2025 15:52 — forked from hippibruder/script_reloader.ahk
GUI for reloading of running AHK scripts
#SingleInstance, Force
; Array of CommandLines of running AHK scripts
processes := []
Gui, Add, Button, Default gUpdateListView, Update List
Gui, Add, ListView, , Name|PID
Gui, Add, Button, gReloadSelected, Reload Selected
UpdateListView()
Gui, Show
#!/bin/bash
# A quick script file for downloading an applying multiple patches when manually compiling GNU bash on Linux
# Written (mostly) by Steve Cook with (a little) help from Steve Jenkins
# This really seems like a lame way to have to do this, but it works. :) Use at your own risk.
# A small change on https://gist.github.com/stevejenkins/3d64d3543060c1bcac92 to read input from command line
version="$1"
nodotversion="${version//./}"
@pa-0
pa-0 / how-to-git-patch-diff.md
Created May 18, 2025 06:18 — forked from nepsilon/how-to-git-patch-diff.md
How to generate and apply patches with git? — First published in fullweb.io issue #33

How to generate and apply patches with git?

It sometimes happen you need change code on a machine from which you cannot push to the repo. You’re ready to copy/paste what diff outputs to your local working copy.

You think there must be a better way to proceed and you’re right. It’s a simple 2 steps process:

1. Generate the patch:

git diff > some-changes.patch
@pa-0
pa-0 / Windows_Gist.txt
Created May 16, 2025 18:44 — forked from dtcu0ng/Windows_Gist.txt
Windows CMD gists
Click here to see code ;)
@pa-0
pa-0 / 7daysclean.cmd
Created May 16, 2025 18:41 — forked from laktiv/7daysclean.cmd
[BAT scripts] #Lib #Script
rem USAGE
rem set /a strip=day*7 : Change 7 for the number of days to keep.
rem set dSource=C:\temp : This is the starting directory to check for files.
rem NOTES! This is non-destructive code, it will display what would have happened.
@echo off
setlocal ENABLEDELAYEDEXPANSION
set day=86400
set /a year=day*365
@pa-0
pa-0 / Uninstall-RazerProducts.ps1
Created May 15, 2025 00:15 — forked from nopeless/f-razer.ps1
uninstall razer script because the uninstaller doesn't properly uninstall
Set-PSDebug -Strict
Set-StrictMode -Version Latest
$WarningPreference = "Inquire"
$ErrorActionPreference = "Stop"
$rp = Get-Process | ? { $_ -like "*razer*" }
if ($rp -and $rp.Count -gt 0) {
Write-Host "Potential Razer processes:"