Skip to content

Instantly share code, notes, and snippets.

View dalepotter's full-sized avatar

Dale Potter dalepotter

  • Bristol, UK
View GitHub Profile
@dalepotter
dalepotter / weekday_calendar.py
Created February 6, 2024 22:06
Output calendar for a given month with weekdays only. Useful for adding to invoices.
# Output calendar for a given month showing:
# - Weekdays only
# - Zero padded single digit day numbers
#
# Example usage:
# $ python weekday_calendar.py
# Enter month (1 = January, 12 = December) [2]:
# Enter year [2024]:
# February 2024
# Mon Tue Wed Thu Fri
@dalepotter
dalepotter / assetz-capital-balence-time-series-exporter.js
Created February 1, 2024 21:21
Download Assetz Capital balance CSV files from a given date.
// Open a browser and login to the Assetz Capital Investors portal
// In the investor portal, navigate to Statements -> Account balances
// Open a debug console and copy/paste the following code
// Set configutation variables
startDate = '2018-05-01'
numMonthsToAdd = 69 // Adjust the monthsToAdd as required. '2018-05-01' + 69 months = 2024-01-01
timezone = 'Europe/London'
// Function to delay execution
@dalepotter
dalepotter / bbc_radio_4_the_unbelievable_truth.rss
Created February 15, 2022 21:05
Podcast RSS for BBC Radio 4's The Unbelievable Truth
<?xml version='1.0' encoding='UTF-8'?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
<channel>
<title>The Unbelievable Truth</title>
<link>https://www.bbc.co.uk/programmes/b007mf4f</link>
<description>Game show in which panellists compete to see how many nuggets of truth they are able to to hide amongst their lies.</description>
<itunes:explicit>no</itunes:explicit>
<docs>http://www.rssboard.org/rss-specification</docs>
<generator>python-podgen v1.1.0 https://podgen.readthedocs.org</generator>
<lastBuildDate>Tue, 15 Feb 2022 21:04:05 +0000</lastBuildDate>
@dalepotter
dalepotter / ping-csv.sh
Created May 29, 2019 10:05 — forked from dansimau/ping-csv.sh
Ping a host and output each reply in CSV format
#!/bin/bash
#
# Do a ping and output results as CSV.
#
# dsimmons@squiz.co.uk
# 2011-12-23
#
if [ $# -lt 1 ]; then
echo "Usage: $0 [--add-timestamp] <ping host>"