Skip to content

Instantly share code, notes, and snippets.

@ghanique
ghanique / modHyperlink.bas
Created August 13, 2018 13:54
VBA Macro for following selected Hyperlinks in Excel
@ghanique
ghanique / github-markdown.css
Last active April 11, 2018 05:52
VSCode Custom Github Markdown
ol {
counter-reset: section; /* Creates a new instance of the
section counter with each ol
element */
list-style-type: none;
}
li::before {
counter-increment: section; /* Increments only this instance
of the section counter */
@ghanique
ghanique / ansible-vault-git-pre-commit
Created January 17, 2018 10:23
Git Precommit Hook for Ansible Vault
#!/bin/sh
#
# Pre-commit hook that verifies if all files containing 'vault' in the name
# are encrypted.
# If not, commit will fail with an error message
#
# File should be .git/hooks/pre-commit and executable
#
# Source: https://reinteractive.com/posts/167-ansible-real-life-good-practices
# Author: RAPHAEL CAMPARDOU
@ghanique
ghanique / DocumentProperties.bas
Created June 21, 2016 10:59
VBA Macro for exporting and importing Word Document Properties
Option Explicit
Private fileName As String
Public Sub ExportProperties()
On Error GoTo ErrorHandler
Let fileName = InputBox("Export properties to ...", "Export", fileName)
Open fileName For Output As #1
@ghanique
ghanique / delete_paragraph.bas
Created June 21, 2016 10:33
VBA Macro to delete a paragraph in Word
Public Sub DeleteParagraph()
On Error GoTo ErrorHandler
Call Selection.Range.Paragraphs(1).Range.Delete
GoSub Finally
Exit Sub
Finally:
Return