This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
' https://github.com/json-path/JsonPath | |
Public Function GetElement(rngJSON As Range, jsonpath As String) As String | |
Dim JSON As Object | |
Set JSON = ParseJson(rngJSON) | |
GetElement = GetNext(JSON, jsonpath) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var t = document.title; | |
var b0 = ""; | |
var s = ""; | |
if (window.location.hostname === "www.setlist.fm") { | |
if (t.includes("Average Setlists")) { | |
b0 = t.substring(0, t.indexOf(" Average Setlists")); | |
} else if (t.includes("Concert Setlist")) { | |
b0 = t.substring(0, t.indexOf(" Concert Setlist")); | |
} | |
// Make sure we're on a supported page by checking if we have the band name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getSelectionText() { | |
var text = ""; | |
if (window.getSelection) { | |
text = window.getSelection().toString(); | |
} else if (document.selection && document.selection.type != "Control") { | |
text = document.selection.createRange().text; | |
} | |
return text; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
urls = [ | |
"http://www.google.com", | |
"http://www.yahoo.com", | |
] | |
def send_mail(sender, recipient, subject, message, password, smtpserver): | |
from smtplib import SMTP | |
from email.mime.text import MIMEText |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Function CountSyllables(TxtIn As String) As Long | |
Dim X As Long | |
For X = 1 To Len(TxtIn) | |
' Vowels | |
CountSyllables = CountSyllables - (Mid(TxtIn, X, 1) Like "[AaEeIiOoUuYy]") | |
' Dipthongs | |
CountSyllables = CountSyllables + (Mid(TxtIn, X, 2) Like "[AaEeIiOoUuYy][AaEeIiOoUuYy]") | |
Next | |
' Silent "e" | |
CountSyllables = CountSyllables + (Right(TxtIn, 3) Like "[AaEeIiOoUuYy][!AaEeIiOoUuYy]e") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="visualization" style="margin: 1em"> </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub CreateAppt() | |
Dim myItem As Outlook.AppointmentItem | |
Set myItem = Application.CreateItem(olAppointmentItem) | |
myItem.MeetingStatus = olNonMeeting | |
myItem.Subject = "Strategy Meeting" | |
myItem.Location = "Conf Rm All Stars" | |
myItem.Start = #12/1/2016 5:30:00 PM# | |
myItem.Duration = 90 | |
myItem.Display |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub CleanStyles() | |
Dim sty As Style, wbTemp As Workbook | |
' First, remove all styles other than Excel's own. | |
' they may have arrived from pasting from other workbooks | |
For Each sty In ThisWorkbook.Styles | |
If Not sty.BuiltIn Then sty.Delete | |
Next | |
'Second, revert the remaining styles to Excel's default for a new workbook |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub TrimStyles() | |
Dim s As Variant | |
Dim g As Style | |
On Error Resume Next | |
With ActiveWorkbook | |
For Each g In .Styles | |
If g.BuiltIn = False Then | |
s = g.Value |