• Welcome to the site

    Hi there. My name is Tom Bush and I like to write on a number of subjects. Some of what I write is helpful, and some of it is not. Please let me know which side your opinion falls into. Drop me a note via the contact page if you have any questions or comments.

    Tom Bush (some people call me Bushy)

Pretty print JSON in Python (snippet)

The below depends on the json Python module to 'pretty print' JSON output in Python. I found this useful when trying to write my script to remove unused Todoist labels. import json # This function saves time printing JSON nicely def pj(str): print(json.dumps(json.loads(str.content), indent=4)) return pj(thing_containing_raw_json_here) Note that in my case this was contingent on having used the requests module in the following fashion to already make sure the format is a bit jsonified, Read more [...]
Posted in Development | Tagged , | Leave a comment

Todoist: Remove unused labels

Want to remove your unused labels/tags from Todoist in bulk? The various GUIs will have you do this one at a time but I have written a small, not very efficient Python script that will do this for you. Here's how it works: You need to provide your API token (Which you can find in Todoist settings) in a file called token.txt Then download or copy the script from my Todoist Remove Unused Tags GitHub repository Just run this using Python and it should work fine Please bear in mind I've Read more [...]
Posted in Development | Tagged , | Leave a comment

Week Commencing Excel Formula

A lot of the data we use is on a daily basis. This is great for more granular insight and for pacing media spend etc. Sometimes however you want to bundle it all up into nice, weekly buckets (often based on 'week commencing') so that you can look at how weeks affect the sales pattern over the month, for example. This might be harder to see based on daily data. If you need to calculate the week commencing date in Excel (i.e. the date of the Monday that another date falls in) then the following Read more [...]
Posted in Excel | Tagged , , , | Leave a comment

15 Best Holiday Tips Beyond The Packing List

We recently went on a holiday to New York. On the last day we stopped in at the Gasoline Alley coffee company and took 15 mins to write down some of the things that had helped it go smoothly. Here are our 15 best holiday tips (and here we’re talking about things you can do to help enjoy your holiday, not the best ways to buy a holiday or a packing list). Make sure there is a balance between organised tourism and doing things that you didn’t already see on a hundred blogs. Plan to be flexible, Read more [...]
Posted in Travel | Tagged , | Leave a comment

WinSXS cleanup: how to remove GB of files in the WinSXS folder

This post is a quick one on WinSXS cleanup, and it works (for me). None of the instructions I found online helped me, including the KB2852386 fix on Windows update. Try this: Go to C:\Windows\system32 Right click on cleanmgr.exe and Run As Administrator Now, the relevant "Windows Update Cleanup" option and another for cleaning up Service Pack backups should appear. Tick them both Proceed! For me this worked a treat for WinSXS cleanup. Read more [...]
Posted in Quick Tips | Tagged , , | Leave a comment