Skip to content

Instantly share code, notes, and snippets.

View discarn8's full-sized avatar

discarn8 discarn8

View GitHub Profile
@discarn8
discarn8 / EXCEL_FORMULA_Combine_cells_with_dot_in_the_middle.vba
Created May 3, 2018 21:27
EXCEL_FORMULA_Combine_cells_with_dot_in_the_middle
=LOWER(CONCATENATE(A2,".",B2))
@discarn8
discarn8 / EXCEL_FORMULA_Check_for_lowercase.vba
Created May 3, 2018 21:32
EXCEL_FORMULA_Check_for_lowercase
check for lowercase
=NOT(EXACT(UPPER(B1),B1))
@discarn8
discarn8 / EXCEL_FORMULA_Check_if_cell_contains_number.vba
Created May 3, 2018 21:32
EXCEL_FORMULA_Check_if_cell_contains_number
Check if the cell has a dn in it and if not - add it
=IF(C2=0,"",IF(ISNUMBER(SEARCH(C2,B2)),B2,B2&" "&C2)
@discarn8
discarn8 / js_HTTP_Redirect.js
Created May 3, 2018 21:56
js_HTTP_Redirect
<!-- beginning of HttpRedirect.htm file -->
<script type="text/javascript">
function redirectToHttps()
{
var httpURL = window.location.hostname+window.location.pathname;
var httpsURL = "https://" + httpURL ;
window.location = httpsURL ;
}
redirectToHttps();
</script>
@discarn8
discarn8 / BASH_Alert_On_Log_Entry.sh
Created May 3, 2018 22:24
BASH_Alert_on_log_entry
#! /bin/bash
#set -x
. /etc/profile
. ~/.bashrc
#CLEAR ANY OLD LOG FILES
#---------------------------------------------------------------------
cat /dev/null > /home/trapfile
#cat /dev/null > /tmp/trap.txt
@discarn8
discarn8 / BASH_dig_network.sh
Created May 3, 2018 22:25
BASH_dig_network
#!/bin/bash
NET=192.168.0
for n in $(seq 1 254); do
ADDR=${NET}.${n}
echo -e "${ADDR}\t$(dig -x ${ADDR} +short)"
done
Public Sub Srch()
'-------------------------------------------------------------------------------------------------
'---Created by: Ryan Wells------------------------------------------------------------------------
'---Date: 03/2015---------------------------------------------------------------------------------
'---Program: OutlookSearch------------------------------------------------------------------------
'---Purpose: Search Outlook inbox for a particular string and display the results-----------------
'------------in a "Search Folders" folder.--------------------------------------------------------
'-------------------1) Make sure you have an email selected in your inbox.------------------------
'-------------------2) Press "Alt F8"-------------------------------------------------------------
'-------------------3) Select SearchString > Run--------------------------------------------------
@discarn8
discarn8 / QuickInfo.vba
Last active May 16, 2018 18:01
OUTLOOK - QuickInfo.vba
Sub QuickInfo()
MsgBox "Message Line 1" & vbCrLf & "Message Line 2" _
& vbCrLf & "Message Line 3" & vbCrLf & "Message Line 4" _
& vbCrLf & "Message Line 5"
End Sub
@discarn8
discarn8 / BulkDatedSubjectMod.vba
Created May 16, 2018 18:20
OUTLOOK - BulkSatedSubjectMod.vba
'This will search the beginning of your email messages for the
' current year(you specify). If it is not already there, the
' script will add the current date / time to the beginning of
' your message subject. Good for archiving messages by date / time
Public Sub datemod()
Dim oMailS As Outlook.MailItem
Dim MsgCount, MsgMatch, ErrCount As Integer
Dim ErrrMsg As String
Dim sstring, dstring
@discarn8
discarn8 / CannedReply.vba
Created May 16, 2018 18:34
OUTLOOK-CannedReply.vba
Public Sub EXTREQ()
Dim oMail, oMailS As Outlook.MailItem
Dim Recip, first, last, rResult, dResult As String
Dim oFSO, oFS, bstring, cstring, sstring, rVar, lVar, fn, ln, rsVar, lsVar, test
Dim objAttach As Outlook.Attachment
Dim SentFrom As Outlook.NameSpace
Set SentFrom = Application.GetNamespace("MAPI")
Set objFolder = Application.ActiveExplorer.CurrentFolder.Items
Set colItems = objFolder