Skip to content

Instantly share code, notes, and snippets.

View vinnyp's full-sized avatar

Vinny Pasceri vinnyp

  • New York, NY
  • 00:16 (UTC -04:00)
View GitHub Profile
' Outlook VBA Script to download all attachments (including embedded attachments) from a specific folder.
' Items will be downloaded into a folder you specify.
Sub downloadallattachments()
'Folder Constants
Const olFolderCalendar = 9
Const olFolderContacts = 10
Const olFolderDeletedItems = 3
Const olFolderDrafts = 16
' WordFrequency
' From: http://wordribbon.tips.net/T010761_Generating_a_Count_of_Word_Occurrences.html
'
' The following macro prompts the user for a word, and then counts the number of times that word appears in the document.
' It will continue to ask for another word until the user clicks on the Cancel button.
Sub WordFrequency()
Const maxwords = 9000 'Maximum unique words allowed
Dim SingleWord As String 'Raw word pulled from doc
Dim Words(maxwords) As String 'Array to hold unique words
@vinnyp
vinnyp / gitemailfix.sh
Last active August 29, 2015 14:22
Fix name and e-mail for previous git commits
git filter-branch --env-filter '
oldname="(old name)"
oldemail="(old email)"
newname="(new name)"
newemail="(new email)"
[ "$GIT_AUTHOR_EMAIL" = "$oldemail" ] && GIT_AUTHOR_EMAIL="$newemail"
[ "$GIT_COMMITTER_EMAIL" = "$oldemail" ] && GIT_COMMITTER_EMAIL="$newemail"
[ "$GIT_AUTHOR_NAME" = "$oldname" ] && GIT_AUTHOR_NAME="$newname"
[ "$GIT_COMMITTER_NAME" = "$oldname" ] && GIT_COMMITTER_NAME="$newname"
' HEAD
@vinnyp
vinnyp / .bash_profile
Created January 9, 2014 07:17
Bash profile for OS X
# Bash profile for MacOS
# Courtesy of http://natelandau.com/my-mac-osx-bash_profile/
#
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)