Skip to content

Instantly share code, notes, and snippets.

@ArneS
ArneS / Automatic kudos to Strava feed bookmarklet.js
Last active June 17, 2025 10:22
Bookmarklet for automatically giving kudos to all events in your Strava feed
const maxButtons = 200; // Its weird going too far back
let delay = 25; // ms delay between clicks
var buttonsToBeClicked = 0;
const poppy = function() {
const popup = document.createElement("div");
popup.innerHTML = `
<div style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); display: flex; justify-content: center; align-items: center;">
<div style="background: white; padding: 20px; border-radius: 5px; text-align: center;">
<h2 style="margin: 0 0 10px;">The Kudoz Machina</h2>
@ArneS
ArneS / Digit to unicode superscript
Created May 13, 2015 18:03
Javascript function to return unicode superscript digits. Handy for writing on html canvas
function digitToUnicodeSupercriptDigit(n) {
subst = [176,185,178,179,0x2074,0x2075,0x2076,0x2077,0x2078,0x2079]
return String.fromCharCode(subst[n]
}
@ArneS
ArneS / RemovePatternFromAttachmentFilename
Last active August 29, 2015 14:10
Outook 2010 VBA macro to remove string patterns from filenames of attachments.
Sub RemovePatternFromAttachmentFilename()
Dim strPattern As String: strPattern = "^[0-9]{3,12}[_][0-9]{1,3}[ ]" ' Matches e.g. "123456_2 Example file.docx"
Dim strReplace As String: strReplace = ""
Dim regEx As New RegExp ' RegExp needs to be enabled. http://stackoverflow.com/questions/21139938/vba-regexp-causes-compile-error-while-vbscript-regexp-works
regEx.Pattern = strPattern
Dim message As Outlook.MailItem
Dim attac As Attachment
Dim i As Long